diff --git a/.github/workflows/test-assets.yml b/.github/workflows/test-assets.yml index 3b3a7c73f..ef80fc48a 100644 --- a/.github/workflows/test-assets.yml +++ b/.github/workflows/test-assets.yml @@ -4,7 +4,6 @@ on: push: paths: - 'app/**' - - 'alembic_db/**' - 'tests-assets/**' - '.github/workflows/test-assets.yml' - 'requirements.txt' diff --git a/alembic.ini b/alembic.ini index 12f18712f..360efd386 100644 --- a/alembic.ini +++ b/alembic.ini @@ -3,7 +3,7 @@ [alembic] # path to migration scripts # Use forward slashes (/) also on windows to provide an os agnostic path -script_location = alembic_db +script_location = app/alembic_db # template used to generate migration file names; The default value is %%(rev)s_%%(slug)s # Uncomment the line below if you want the files to be prepended with date and time diff --git a/alembic_db/README.md b/app/alembic_db/README.md similarity index 100% rename from alembic_db/README.md rename to app/alembic_db/README.md diff --git a/alembic_db/env.py b/app/alembic_db/env.py similarity index 100% rename from alembic_db/env.py rename to app/alembic_db/env.py diff --git a/alembic_db/script.py.mako b/app/alembic_db/script.py.mako similarity index 100% rename from alembic_db/script.py.mako rename to app/alembic_db/script.py.mako diff --git a/alembic_db/versions/0001_assets.py b/app/alembic_db/versions/0001_assets.py similarity index 100% rename from alembic_db/versions/0001_assets.py rename to app/alembic_db/versions/0001_assets.py diff --git a/app/database/db.py b/app/database/db.py index 82c9cc737..54f9000cc 100644 --- a/app/database/db.py +++ b/app/database/db.py @@ -26,9 +26,9 @@ SESSION: Optional[async_sessionmaker] = None def _root_paths(): """Resolve alembic.ini and migrations script folder.""" - root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) - config_path = os.path.abspath(os.path.join(root_path, "alembic.ini")) - scripts_path = os.path.abspath(os.path.join(root_path, "alembic_db")) + root_path = os.path.abspath(os.path.dirname(__file__)) + config_path = os.path.abspath(os.path.join(root_path, "../../alembic.ini")) + scripts_path = os.path.abspath(os.path.join(root_path, "../alembic_db")) return config_path, scripts_path