db: postgres cast int to bigint (#231)

* db: postgres cast int to bigint

* migrations: use db.big_int
This commit is contained in:
callebtc
2023-05-19 08:59:13 +02:00
committed by GitHub
parent 730772d6a7
commit 151fa1421a
3 changed files with 13 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ async def m001_initial(db: Database):
await db.execute(
f"""
CREATE TABLE IF NOT EXISTS {table_with_schema(db, 'promises')} (
amount INTEGER NOT NULL,
amount {db.big_int} NOT NULL,
B_b TEXT NOT NULL,
C_b TEXT NOT NULL,
@@ -29,7 +29,7 @@ async def m001_initial(db: Database):
await db.execute(
f"""
CREATE TABLE IF NOT EXISTS {table_with_schema(db, 'proofs_used')} (
amount INTEGER NOT NULL,
amount {db.big_int} NOT NULL,
C TEXT NOT NULL,
secret TEXT NOT NULL,
@@ -42,7 +42,7 @@ async def m001_initial(db: Database):
await db.execute(
f"""
CREATE TABLE IF NOT EXISTS {table_with_schema(db, 'invoices')} (
amount INTEGER NOT NULL,
amount {db.big_int} NOT NULL,
pr TEXT NOT NULL,
hash TEXT NOT NULL,
issued BOOL NOT NULL,