fix: use sync engine for alembic migration operations
SQLAlchemy 2.0 async engines don't support the sync context manager protocol needed by alembic. Create a separate sync engine (using psycopg2) for migration operations while keeping async engine for application queries. - Add psycopg2-binary dependency - Rename async connection variable to avoid mypy confusion - Use sync engine for MigrationContext and alembic commands
This commit is contained in:
@@ -8,6 +8,7 @@ dependencies = [
|
||||
"uvicorn[standard]>=0.24.0",
|
||||
"sqlalchemy>=2.0.0",
|
||||
"asyncpg>=0.29.0",
|
||||
"psycopg2-binary>=2.9.0",
|
||||
"alembic>=1.12.0",
|
||||
"pydantic>=2.5.0",
|
||||
"pydantic-settings>=2.1.0",
|
||||
|
||||
Reference in New Issue
Block a user