File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1+ DROP INDEX IF EXISTS account_invoices_unique;
2+ DROP INDEX IF EXISTS account_payments_unique;
13DROP TABLE IF EXISTS account_payments;
24DROP TABLE IF EXISTS account_invoices;
35DROP TABLE IF EXISTS account_indices;
Original file line number Diff line number Diff line change @@ -42,9 +42,11 @@ CREATE TABLE IF NOT EXISTS account_payments (
4242
4343 -- The total amount of the payment in millisatoshis.
4444 -- This includes the payment amount and estimated routing fee.
45- full_amount_msat BIGINT NOT NULL ,
45+ full_amount_msat BIGINT NOT NULL
46+ );
4647
47- UNIQUE(account_id, hash)
48+ CREATE UNIQUE INDEX account_payments_unique ON account_payments (
49+ account_id, hash
4850);
4951
5052-- The account_invoices table stores all the invoice payment hashes that
@@ -55,9 +57,11 @@ CREATE TABLE IF NOT EXISTS account_invoices (
5557 account_id BIGINT NOT NULL REFERENCES accounts(id) ON DELETE CASCADE ,
5658
5759 -- The payment hash of the invoice.
58- hash BLOB NOT NULL ,
60+ hash BLOB NOT NULL
61+ );
5962
60- UNIQUE(account_id, hash)
63+ CREATE UNIQUE INDEX account_invoices_unique ON account_invoices (
64+ account_id, hash
6165);
6266
6367-- The account_indices table stores any string-to-integer mappings that are
You can’t perform that action at this time.
0 commit comments