move alembic_db inside app folder (#10163)

This commit is contained in:
Alexander Piskun 2025-10-03 01:01:16 +03:00 committed by GitHub
parent fbba2e59e5
commit 94941c50b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 4 additions and 5 deletions

View File

@ -4,7 +4,6 @@ on:
push:
paths:
- 'app/**'
- 'alembic_db/**'
- 'tests-assets/**'
- '.github/workflows/test-assets.yml'
- 'requirements.txt'

View File

@ -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

View File

@ -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