forked from coracle/caravel
Improve transactionality, align invoice model with frontend
This commit is contained in:
@@ -49,6 +49,7 @@ CREATE TABLE IF NOT EXISTS invoice (
|
||||
id TEXT PRIMARY KEY,
|
||||
tenant_pubkey TEXT NOT NULL,
|
||||
method TEXT CHECK (method IS NULL OR method IN ('nwc','stripe','oob')),
|
||||
amount INTEGER NOT NULL,
|
||||
period_start INTEGER NOT NULL,
|
||||
period_end INTEGER NOT NULL,
|
||||
created_at INTEGER NOT NULL,
|
||||
@@ -110,5 +111,3 @@ CREATE INDEX IF NOT EXISTS idx_invoice_item_outstanding ON invoice_item (tenant_
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_invoice_item_activity ON invoice_item (activity_id);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_bolt11_invoice_created ON bolt11 (invoice_id, created_at);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_intent_invoice ON intent (invoice_id);
|
||||
|
||||
Reference in New Issue
Block a user