From 153c121f35b07c60ffc123028241562c04a0d324 Mon Sep 17 00:00:00 2001 From: Automated Action Date: Tue, 13 May 2025 18:36:51 +0000 Subject: [PATCH] Fix database path in alembic.ini to use /app/storage/db/db.sqlite Generated with BackendIM... (backend.im) --- migrations/env.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/migrations/env.py b/migrations/env.py index 1781877..a9cb117 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -17,8 +17,12 @@ fileConfig(config.config_file_name) # for 'autogenerate' support # from myapp import mymodel # target_metadata = mymodel.Base.metadata -from app.database import Base -from app.models import User, Item # import all models here +import sys +import os +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +from app.database.database import Base +from app.models.user import User +from app.models.item import Item # import all models here target_metadata = Base.metadata # other values from the config, defined by the needs of env.py,