mitlist/be/alembic
google-labs-jules[bot] 287155a783 Fix(alembic): Resolve TypeError in migration script and remove redundant migration call
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.
2025-06-01 17:16:41 +00:00
..
versions Fix(alembic): Resolve TypeError in migration script and remove redundant migration call 2025-06-01 17:16:41 +00:00
env.py refactor: Separate async migration logic into dedicated module and streamline migration functions for improved clarity and maintainability 2025-06-01 17:33:04 +02:00
migrations.py refactor: Clarify access to revision strings in migration function by referencing Script object within RevisionStep 2025-06-01 18:09:31 +02:00
README weeee💃 2025-03-30 16:02:49 +02:00
script.py.mako weeee💃 2025-03-30 16:02:49 +02:00

Generic single-database configuration.