refactor: add status column to apipayments (#2537)
* refactor: add status column to apipayments keep track of the payment status with an enum and persist it as string to db. `pending`, `success`, `failed`. - database migration - remove deleting of payments, failed payments stay
This commit is contained in:
parent
b14d36a0aa
commit
8f761dfd0f
14 changed files with 301 additions and 258 deletions
|
|
@ -55,8 +55,8 @@ cursor.execute(
|
|||
"""
|
||||
INSERT INTO apipayments
|
||||
(wallet, checking_id, bolt11, hash, preimage,
|
||||
amount, pending, memo, fee, extra, webhook, expiry)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
amount, status, memo, fee, extra, webhook, expiry, pending)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
""",
|
||||
(
|
||||
wallet_id,
|
||||
|
|
@ -65,12 +65,13 @@ cursor.execute(
|
|||
"test_admin_internal",
|
||||
None,
|
||||
amount * 1000,
|
||||
False,
|
||||
"success",
|
||||
"test_admin_internal",
|
||||
0,
|
||||
None,
|
||||
"",
|
||||
expiration_date,
|
||||
False, # TODO: remove this in next release
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue