Mint: fix lnbits migration (#407)

* fix lnbits migration

* save without format

* make format
This commit is contained in:
callebtc
2024-02-05 17:52:47 +01:00
committed by GitHub
parent e02e4bbf49
commit f8f167fe23

View File

@@ -312,8 +312,9 @@ async def m011_add_quote_tables(db: Database):
await conn.execute(
f"INSERT INTO {table_with_schema(db, 'mint_quotes')} (quote, method,"
" request, checking_id, unit, amount, paid, issued, created_time,"
" paid_time) SELECT id, 'bolt11', bolt11, payment_hash, 'sat', amount,"
f" False, issued, created, NULL FROM {table_with_schema(db, 'invoices')} "
" paid_time) SELECT id, 'bolt11', bolt11, COALESCE(payment_hash, 'None'),"
f" 'sat', amount, False, issued, COALESCE(created, '{timestamp_now(db)}'),"
f" NULL FROM {table_with_schema(db, 'invoices')} "
)
# drop table invoices