Issue 1: repo scaffold and project structure
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
"""Run Alembic migrations to head on startup."""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from alembic import command
|
||||
from alembic.config import Config
|
||||
|
||||
|
||||
def run_migrations() -> None:
|
||||
"""Apply all pending Alembic migrations."""
|
||||
backend_dir = Path(__file__).resolve().parent.parent
|
||||
alembic_cfg = Config(str(backend_dir / "alembic.ini"))
|
||||
alembic_cfg.set_main_option("script_location", str(backend_dir / "alembic"))
|
||||
command.upgrade(alembic_cfg, "head")
|
||||
Reference in New Issue
Block a user