mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Map BIGINT to INTEGER for SQLite
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
28ba3f77dc
commit
31a5b40b5c
1 changed files with 11 additions and 0 deletions
|
@ -17,6 +17,17 @@ def compile_tinyint_sqlite(type_, compiler, **kw):
|
||||||
return 'INTEGER'
|
return 'INTEGER'
|
||||||
|
|
||||||
|
|
||||||
|
@compiles(BIGINT, 'sqlite')
|
||||||
|
def compile_bigint_sqlite(type_, compiler, **kw):
|
||||||
|
"""
|
||||||
|
For SQLite's AUTOINCREMENT to work on BIGINT columns, we need to map BIGINT
|
||||||
|
to INTEGER. Aside from that, BIGINT is the same as INTEGER for SQLite.
|
||||||
|
|
||||||
|
See https://docs.sqlalchemy.org/en/13/dialects/sqlite.html#allowing-autoincrement-behavior-sqlalchemy-types-other-than-integer-integer
|
||||||
|
"""
|
||||||
|
return 'INTEGER'
|
||||||
|
|
||||||
|
|
||||||
metadata = MetaData()
|
metadata = MetaData()
|
||||||
|
|
||||||
# Define the Account Types for the AUR.
|
# Define the Account Types for the AUR.
|
||||||
|
|
Loading…
Add table
Reference in a new issue