adding migrations

This commit is contained in:
ben
2022-10-25 11:10:34 +01:00
parent a37bec80cf
commit 3552443f99
2 changed files with 39 additions and 0 deletions

View File

@@ -88,3 +88,28 @@ async def m003_redux(db):
await db.execute(
"ALTER TABLE lnurldevice.lnurldevices ADD COLUMN amount INT DEFAULT 0;"
)
async def m004_redux(db):
"""
Add 'meta' for storing various metadata about the wallet
"""
await db.execute(
"""
ALTER TABLE lnurldevice.lnurldevices ADD COLUMN (
amount1,
amount2,
amount3,
amount4,
time,
time1,
time2,
time3,
time4,
pin1,
pin2,
pin3,
pin4,
)
INT DEFAULT 0;
"""
)

View File

@@ -18,6 +18,20 @@ class createLnurldevice(BaseModel):
device: str
profit: float
amount: int
amount1: int
amount2: int
amount3: int
amount4: int
pin: int
pin1: int
pin2: int
pin3: int
pin4: int
time: int
time1: int
time2: int
time3: int
time4: int
class lnurldevices(BaseModel):