Commit graph

4 commits

Author SHA1 Message Date
Andras Banki-Horvath
84598b6dc1
sqldb: ensure schema definitions are fully SQLite compatible
Previously, we applied replacements to our schema definitions
to make them compatible with both SQLite and Postgres backends,
as the files were not fully compatible with either.

With this change, the only replacement required for SQLite has
been moved to the generator script. This adjustment ensures
compatibility by enabling auto-incrementing primary keys that
are treated as 64-bit integers by sqlc.
2025-01-23 09:11:02 +01:00
Andras Banki-Horvath
b92f57e0ae
invoices: add migration code that runs a full invoice DB SQL migration 2025-01-23 09:11:01 +01:00
Andras Banki-Horvath
708bed517d
invoices: add migration code for a single invoice 2025-01-23 09:11:01 +01:00
Andras Banki-Horvath
43797d6be7
invoices: add method to create payment hash index
Certain invoices may not have a deterministic payment hash. For such
invoices we still store the payment hashes in our KV database, but we do
not have a sufficient index to retrieve them. This PR adds such index to
the SQL database that will be used during migration to retrieve payment
hashes.
2025-01-23 09:11:00 +01:00