Deployment Method
Source
Summary
After pulling latest code and running:
cd backend
source .venv/bin/activate
alembic upgrade head
migration fails with:
Multiple head revisions are present for given argument 'head'
- If using
alembic upgrade heads, then:
DuplicateColumnError: column "sso_login_enabled" of relation "identity_providers" already exists
Related Commit: dd7763c
Related File: add_sso_login_enabled.py
Cause
backend/alembic/versions/add_sso_login_enabled.py has:
revision = "add_sso_login_enabled"
down_revision = None
This introduces a new root branch and causes multiple heads.
- Runtime schema can already contain
sso_login_enabled before this migration runs because:
- ORM model includes
sso_login_enabled in IdentityProvider
- App startup scripts call
Base.metadata.create_all:
If identity_providers is created from ORM metadata first, migration op.add_column(...) becomes duplicate.