Add Alembic to project for database migrations

This commit is contained in:
Lexi / Zoe 2022-04-15 16:10:38 +02:00
parent 7755bfb46d
commit 7ce43a2bfe
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
15 changed files with 256 additions and 49 deletions

View file

@ -60,12 +60,8 @@ class App(Flask):
# Import models to fill the metadata object
import tofu_api.models # noqa (unused import)
# Create all tables
# TODO: Use migrations instead
db.create_all_tables()
def create_app() -> Flask:
def create_app() -> App:
"""
App factory, returns a Flask app object.
"""