fix: Update PostgreSQL database URL for Alembic to use psycopg driver
This commit is contained in:
@@ -16,7 +16,7 @@ config = context.config
|
||||
|
||||
# Set the database URL from settings - convert async URL to sync for alembic
|
||||
sync_db_url = settings.DATABASE_URL.replace("sqlite+aiosqlite", "sqlite")
|
||||
sync_db_url = sync_db_url.replace("postgresql+asyncpg", "postgresql")
|
||||
sync_db_url = sync_db_url.replace("postgresql+asyncpg", "postgresql+psycopg")
|
||||
config.set_main_option("sqlalchemy.url", sync_db_url)
|
||||
|
||||
# Interpret the config file for Python logging.
|
||||
|
||||
Reference in New Issue
Block a user