![]() This commit addresses two issues: 1. A `TypeError` during Alembic migrations (`upgrade() takes 0 positional arguments but 1 was given`). This was caused by the `upgrade` and `downgrade` functions in the initial migration script not accepting any arguments, while the custom migration runner in `migrations.py` was passing a context argument. - Modified `be/alembic/versions/0001_initial_schema.py` to ensure `upgrade` and `downgrade` functions accept a `context` argument. 2. Redundant execution of migrations. Migrations were being triggered both by the `entrypoint.sh` script and within the FastAPI application's startup event in `app/main.py`. - Commented out the `await run_migrations()` call in `app/main.py` to ensure migrations are only handled by the `entrypoint.sh` script. These changes should ensure that database migrations run correctly and only once when the backend container starts. |
||
---|---|---|
.cursor/rules | ||
.gitea/workflows | ||
be | ||
docs | ||
fe | ||
docker-compose.prod.yml | ||
docker-compose.yml | ||
env.production.template | ||
mitlist_doc.md | ||
notes.md | ||
PRODUCTION.md |