From 016ed7739a77d4c0457449d206b15606a93d51f9 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 22 Dec 2021 00:36:41 +0100 Subject: [PATCH] fix(db): Fix Serial column type for SQLite --- flaschengeist/models/__init__.py | 2 +- tests/conftest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flaschengeist/models/__init__.py b/flaschengeist/models/__init__.py index f4ab8ec..8cf3850 100644 --- a/flaschengeist/models/__init__.py +++ b/flaschengeist/models/__init__.py @@ -48,7 +48,7 @@ class Serial(TypeDecorator): """Same as MariaDB Serial used for IDs""" cache_ok = True - impl = BigInteger().with_variant(mysql.BIGINT(unsigned=True), "mysql").with_variant(sqlite.INTEGER, "sqlite") + impl = BigInteger().with_variant(mysql.BIGINT(unsigned=True), "mysql").with_variant(sqlite.INTEGER(), "sqlite") class UtcDateTime(TypeDecorator): diff --git a/tests/conftest.py b/tests/conftest.py index fb02e05..e5f798f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -31,7 +31,7 @@ def app(): with app.app_context(): database.db.create_all() database.db.session.commit() - + engine = database.db.engine with engine.connect() as connection: for statement in _data_sql: