Skip to content

Commit

Permalink
readd paid flag removed in #622 before
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Oct 4, 2024
1 parent d15f6c6 commit acd3a88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cashu/mint/migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ async def m011_add_quote_tables(db: Database):
checking_id TEXT NOT NULL,
unit TEXT NOT NULL,
amount {db.big_int} NOT NULL,
paid BOOL NOT NULL,
issued BOOL NOT NULL,
created_time TIMESTAMP,
paid_time TIMESTAMP,
Expand All @@ -296,7 +297,6 @@ async def m011_add_quote_tables(db: Database):
);
"""
# NOTE: We remove the paid BOOL NOT NULL column
)

await conn.execute(
Expand All @@ -309,6 +309,7 @@ async def m011_add_quote_tables(db: Database):
unit TEXT NOT NULL,
amount {db.big_int} NOT NULL,
fee_reserve {db.big_int},
paid BOOL NOT NULL,
created_time TIMESTAMP,
paid_time TIMESTAMP,
fee_paid {db.big_int},
Expand All @@ -318,14 +319,13 @@ async def m011_add_quote_tables(db: Database):
);
"""
# NOTE: We remove the paid BOOL NOT NULL column
)

await conn.execute(
f"INSERT INTO {db.table_with_schema('mint_quotes')} (quote, method,"
" request, checking_id, unit, amount, issued, created_time,"
" request, checking_id, unit, amount, paid, issued, created_time,"
" paid_time) SELECT id, 'bolt11', bolt11, COALESCE(payment_hash, 'None'),"
f" 'sat', amount, issued, COALESCE(created, '{db.timestamp_now_str()}'),"
f" 'sat', amount, False, issued, COALESCE(created, '{db.timestamp_now_str()}'),"
f" NULL FROM {db.table_with_schema('invoices')} "
)

Expand Down

0 comments on commit acd3a88

Please sign in to comment.