Add Alembic to project for database migrations
This commit is contained in:
parent
7755bfb46d
commit
7ce43a2bfe
15 changed files with 256 additions and 49 deletions
|
|
@ -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.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue