fix: use subprocess for alembic migrations to avoid async/sync issues
SQLAlchemy 2.0 async engines conflict with alembic's sync context manager. Instead of trying to bridge async/sync, use subprocess to run 'alembic upgrade head' directly. This is simpler and more reliable. - Remove psycopg2-binary dependency (no longer needed) - Simplify init_database to use subprocess.run() - Remove all sync engine code
This commit is contained in:
@@ -8,7 +8,6 @@ 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