From f8f167fe23987a962a67171ec7414d9b970d7f35 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:52:47 +0100 Subject: [PATCH] Mint: fix lnbits migration (#407) * fix lnbits migration * save without format * make format --- cashu/mint/migrations.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cashu/mint/migrations.py b/cashu/mint/migrations.py index 4e7f613..4d33c8d 100644 --- a/cashu/mint/migrations.py +++ b/cashu/mint/migrations.py @@ -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