Compare commits
2 Commits
792a7878f0
...
de5f54f970
Author | SHA1 | Date | |
---|---|---|---|
de5f54f970 | |||
![]() |
f2df1c50dd |
@ -223,7 +223,9 @@ async def startup_event():
|
|||||||
# Run database migrations
|
# Run database migrations
|
||||||
try:
|
try:
|
||||||
logger.info("Running database migrations...")
|
logger.info("Running database migrations...")
|
||||||
alembic_cfg = Config("alembic.ini")
|
alembic_cfg = Config()
|
||||||
|
alembic_cfg.set_main_option("script_location", "alembic")
|
||||||
|
alembic_cfg.set_main_option("sqlalchemy.url", settings.DATABASE_URL)
|
||||||
command.upgrade(alembic_cfg, "head")
|
command.upgrade(alembic_cfg, "head")
|
||||||
logger.info("Database migrations completed successfully.")
|
logger.info("Database migrations completed successfully.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user