diff --git a/lnbits/extensions/lnurlp/migrations.py b/lnbits/extensions/lnurlp/migrations.py index 5258471d..c4edd3aa 100644 --- a/lnbits/extensions/lnurlp/migrations.py +++ b/lnbits/extensions/lnurlp/migrations.py @@ -8,7 +8,7 @@ async def m001_initial(db): id {db.serial_primary_key}, wallet TEXT NOT NULL, description TEXT NOT NULL, - amount INTEGER NOT NULL, + amount {db.big_int} NOT NULL, served_meta INTEGER NOT NULL, served_pr INTEGER NOT NULL ); diff --git a/lnbits/extensions/offlineshop/migrations.py b/lnbits/extensions/offlineshop/migrations.py index 84aea27e..4e668668 100644 --- a/lnbits/extensions/offlineshop/migrations.py +++ b/lnbits/extensions/offlineshop/migrations.py @@ -22,7 +22,7 @@ async def m001_initial(db): description TEXT NOT NULL, image TEXT, -- image/png;base64,... enabled BOOLEAN NOT NULL DEFAULT true, - price INTEGER NOT NULL, + price {db.big_int} NOT NULL, unit TEXT NOT NULL DEFAULT 'sat' ); """ diff --git a/lnbits/extensions/paywall/migrations.py b/lnbits/extensions/paywall/migrations.py index fa91e409..9b3341fd 100644 --- a/lnbits/extensions/paywall/migrations.py +++ b/lnbits/extensions/paywall/migrations.py @@ -3,14 +3,14 @@ async def m001_initial(db): Initial paywalls table. """ await db.execute( - """ + f""" CREATE TABLE paywall.paywalls ( id TEXT PRIMARY KEY, wallet TEXT NOT NULL, secret TEXT NOT NULL, url TEXT NOT NULL, memo TEXT NOT NULL, - amount INTEGER NOT NULL, + amount {db.big_int} NOT NULL, time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ @@ -25,14 +25,14 @@ async def m002_redux(db): """ await db.execute("ALTER TABLE paywall.paywalls RENAME TO paywalls_old") await db.execute( - """ + f""" CREATE TABLE paywall.paywalls ( id TEXT PRIMARY KEY, wallet TEXT NOT NULL, url TEXT NOT NULL, memo TEXT NOT NULL, description TEXT NULL, - amount INTEGER DEFAULT 0, + amount {db.big_int} DEFAULT 0, time TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """, diff --git a/lnbits/extensions/satsdice/migrations.py b/lnbits/extensions/satsdice/migrations.py index 61298241..82ab35ba 100644 --- a/lnbits/extensions/satsdice/migrations.py +++ b/lnbits/extensions/satsdice/migrations.py @@ -3,14 +3,14 @@ async def m001_initial(db): Creates an improved satsdice table and migrates the existing data. """ await db.execute( - """ + f""" CREATE TABLE satsdice.satsdice_pay ( id TEXT PRIMARY KEY, wallet TEXT, title TEXT, min_bet INTEGER, max_bet INTEGER, - amount INTEGER DEFAULT 0, + amount {db.big_int} DEFAULT 0, served_meta INTEGER NOT NULL, served_pr INTEGER NOT NULL, multiplier FLOAT, @@ -28,11 +28,11 @@ async def m002_initial(db): Creates an improved satsdice table and migrates the existing data. """ await db.execute( - """ + f""" CREATE TABLE satsdice.satsdice_withdraw ( id TEXT PRIMARY KEY, satsdice_pay TEXT, - value INTEGER DEFAULT 1, + value {db.big_int} DEFAULT 1, unique_hash TEXT UNIQUE, k1 TEXT, open_time INTEGER, @@ -47,11 +47,11 @@ async def m003_initial(db): Creates an improved satsdice table and migrates the existing data. """ await db.execute( - """ + f""" CREATE TABLE satsdice.satsdice_payment ( payment_hash TEXT PRIMARY KEY, satsdice_pay TEXT, - value INTEGER, + value {db.big_int}, paid BOOL DEFAULT FALSE, lost BOOL DEFAULT FALSE ); diff --git a/lnbits/extensions/satspay/migrations.py b/lnbits/extensions/satspay/migrations.py index ff6b44be..e23bd413 100644 --- a/lnbits/extensions/satspay/migrations.py +++ b/lnbits/extensions/satspay/migrations.py @@ -4,7 +4,7 @@ async def m001_initial(db): """ await db.execute( - """ + f""" CREATE TABLE satspay.charges ( id TEXT NOT NULL PRIMARY KEY, "user" TEXT, @@ -18,8 +18,8 @@ async def m001_initial(db): completelink TEXT, completelinktext TEXT, time INTEGER, - amount INTEGER, - balance INTEGER DEFAULT 0, + amount {db.big_int}, + balance {db.big_int} DEFAULT 0, timestamp TIMESTAMP NOT NULL DEFAULT """ + db.timestamp_now + """ diff --git a/lnbits/extensions/watchonly/migrations.py b/lnbits/extensions/watchonly/migrations.py index 76f7f951..e33062c9 100644 --- a/lnbits/extensions/watchonly/migrations.py +++ b/lnbits/extensions/watchonly/migrations.py @@ -3,25 +3,25 @@ async def m001_initial(db): Initial wallet table. """ await db.execute( - """ + f""" CREATE TABLE watchonly.wallets ( id TEXT NOT NULL PRIMARY KEY, "user" TEXT, masterpub TEXT NOT NULL, title TEXT NOT NULL, address_no INTEGER NOT NULL DEFAULT 0, - balance INTEGER NOT NULL + balance {db.big_int} NOT NULL ); """ ) await db.execute( - """ + f""" CREATE TABLE watchonly.addresses ( id TEXT NOT NULL PRIMARY KEY, address TEXT NOT NULL, wallet TEXT NOT NULL, - amount INTEGER NOT NULL + amount {db.big_int} NOT NULL ); """ ) diff --git a/lnbits/extensions/withdraw/migrations.py b/lnbits/extensions/withdraw/migrations.py index 5484277a..0c6ed4fc 100644 --- a/lnbits/extensions/withdraw/migrations.py +++ b/lnbits/extensions/withdraw/migrations.py @@ -3,13 +3,13 @@ async def m001_initial(db): Creates an improved withdraw table and migrates the existing data. """ await db.execute( - """ + f""" CREATE TABLE withdraw.withdraw_links ( id TEXT PRIMARY KEY, wallet TEXT, title TEXT, - min_withdrawable INTEGER DEFAULT 1, - max_withdrawable INTEGER DEFAULT 1, + min_withdrawable {db.big_int} DEFAULT 1, + max_withdrawable {db.big_int} DEFAULT 1, uses INTEGER DEFAULT 1, wait_time INTEGER, is_unique INTEGER DEFAULT 0, @@ -28,13 +28,13 @@ async def m002_change_withdraw_table(db): Creates an improved withdraw table and migrates the existing data. """ await db.execute( - """ + f""" CREATE TABLE withdraw.withdraw_link ( id TEXT PRIMARY KEY, wallet TEXT, title TEXT, - min_withdrawable INTEGER DEFAULT 1, - max_withdrawable INTEGER DEFAULT 1, + min_withdrawable {db.big_int} DEFAULT 1, + max_withdrawable {db.big_int} DEFAULT 1, uses INTEGER DEFAULT 1, wait_time INTEGER, is_unique INTEGER DEFAULT 0,