forked from coracle/caravel
Split out migration
This commit is contained in:
@@ -42,7 +42,6 @@ CREATE TABLE IF NOT EXISTS relay (
|
||||
blossom_enabled INTEGER NOT NULL DEFAULT 0,
|
||||
livekit_enabled INTEGER NOT NULL DEFAULT 0,
|
||||
push_enabled INTEGER NOT NULL DEFAULT 1,
|
||||
created_at INTEGER NOT NULL,
|
||||
FOREIGN KEY (tenant_pubkey) REFERENCES tenant(pubkey)
|
||||
);
|
||||
|
||||
@@ -115,8 +114,6 @@ CREATE INDEX IF NOT EXISTS idx_activity_unbilled ON activity (tenant_pubkey, cre
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_relay_tenant_pubkey ON relay (tenant_pubkey);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_relay_created ON relay (created_at);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_invoice_tenant_created ON invoice (tenant_pubkey, created_at);
|
||||
|
||||
-- Dunning scans a tenant's still-open invoices oldest-first to retry payment.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE relay ADD COLUMN created_at INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_relay_created ON relay (created_at);
|
||||
Reference in New Issue
Block a user