Files
brackets/backend/alembic/env.py
T
WilliamSoderberg Verified 989f591417
Test and Release / test-backend (push) Successful in 6s
Test and Release / test-frontend (push) Successful in 12s
Test and Release / build-docker (backend) (push) Skipped
Test and Release / build-docker (frontend) (push) Skipped
Test and Release / test-backend (release) Successful in 7s
Test and Release / test-frontend (release) Successful in 11s
Test and Release / build-docker (backend) (release) Successful in 9s
Test and Release / build-docker (frontend) (release) Successful in 9s
New database migration
2026-08-29 21:25:25 +02:00

21 lines
505 B
Python

# backend/alembic/env.py
import sys
from os.path import dirname, abspath
from logging.config import fileConfig
from sqlalchemy import pool
from alembic import context
sys.path.insert(0, dirname(dirname(abspath(__file__))))
from app.database import Base, SQLALCHEMY_DATABASE_URL
import app.models
config = context.config
if config.config_file_name is not None:
fileConfig(config.config_file_name)
config.set_main_option("sqlalchemy.url", SQLALCHEMY_DATABASE_URL)
target_metadata = Base.metadata