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:
Fusion
2026-05-18 23:16:01 +02:00
parent 1e70462c2b
commit caf73e39ba
2 changed files with 27 additions and 47 deletions
-1
View File
@@ -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",