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

@@ -49,6 +49,12 @@ class Compat:
return ""
return "<nothing>"
@property
def big_int(self) -> str:
if self.type in {POSTGRES}:
return "BIGINT"
return "INT"
class Connection(Compat):
def __init__(self, conn: AsyncConnection, txn, typ, name, schema):