Skip to content

Commit

Permalink
make zero conf work (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
talvasconcelos authored Oct 9, 2023
1 parent 15ab4e9 commit ba0496e
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 55 deletions.
19 changes: 19 additions & 0 deletions migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,22 @@ async def m006_add_zeroconf_column(db):
)
except OperationalError:
pass


async def m007_add_pending_column(db):
"""
Add 'pending' column for storing the pending amount
"""
try:
await db.execute(
f"ALTER TABLE satspay.charges ADD COLUMN pending {db.big_int} NOT NULL DEFAULT 0;"
)

await db.execute(
"""
UPDATE satspay.charges
SET pending = 0
"""
)
except OperationalError:
pass
Loading

0 comments on commit ba0496e

Please sign in to comment.