Merge pull request #1135 from ChuckNorrison/postgre-bigint

fix integer to bigint for extensions
This commit is contained in:
calle 2022-11-29 12:11:07 +01:00 committed by GitHub
commit fd696b1dc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 25 deletions

View File

@ -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
);

View File

@ -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'
);
"""

View File

@ -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
+ """,

View File

@ -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
);

View File

@ -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
+ """

View File

@ -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
);
"""
)

View File

@ -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,