diff --git a/alembic/env.py b/alembic/env.py index a0824a3..519016f 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -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.