Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kristian Klausen
aurweb
Commits
31a5b40b
Commit
31a5b40b
authored
Mar 21, 2020
by
Frédéric Mangano-Tarumi
Committed by
Lukas Fleischer
Mar 22, 2020
Browse files
Map BIGINT to INTEGER for SQLite
Signed-off-by:
Lukas Fleischer
<
lfleischer@archlinux.org
>
parent
28ba3f77
Changes
1
Hide whitespace changes
Inline
Side-by-side
aurweb/schema.py
View file @
31a5b40b
...
...
@@ -17,6 +17,17 @@ def compile_tinyint_sqlite(type_, compiler, **kw):
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
()
# Define the Account Types for the AUR.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment