sqldb: simplify and fixup the existing invoice store schema and queries

This commit attempts to fix some issues with the invoice store's schema that we
couldn't foresee before the implementation was finished. This is safe as the
schema has not been instantiated yet outside of unit tests. Furthermore the
commit updates invoice store SQL queries according to fixes in the schema as
well as to prepare the higher level implementation in the upcoming commits.
This commit is contained in:
Andras Banki-Horvath committed 2024-03-01 10:08:07 +01:00
1 parent 3e0f98a75a
commit 6a360fb2e2
12 files changed
+781 -937

No files matched your search

@@ -1,9 +1,6 @@
DROP TABLE IF EXISTS invoice_events;
DROP INDEX IF EXISTS invoice_events_created_at_idx;
DROP INDEX IF EXISTS invoice_events_invoice_id_idx;
DROP INDEX IF EXISTS invoice_events_htlc_id_idx;
DROP INDEX IF EXISTS invoice_events_set_id_idx;
DROP INDEX IF EXISTS invoice_events_added_at_idx;
DROP INDEX IF EXISTS invoice_events_event_type_idx;
DROP INDEX IF EXISTS invoice_events_invoice_id_idx;
DROP INDEX IF EXISTS invoice_events_set_id_idx;
DROP TABLE IF EXISTS invoice_event_types;