fix: add partial index declarations to Block and Note models #263
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-api#263
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Regression from
forgejo_admin/pal-e-api #253— partial indexes were created in migrationu1p2q3r4s5t6but not declared in the SQLAlchemy models.Repo
forgejo_admin/pal-e-apiWhat Broke
CI
alembic checkstep fails because two partial indexes exist in the database (from migration) but are not declared in the models. Alembic interprets this as "models want these indexes removed" and reports drift:Repro Steps
alembic checkExpected Behavior
alembic checkpasses — models match migrations.Environment
alembic checkstepAcceptance Criteria
Block.__table_args__includesIndex("ix_blocks_block_type_mermaid", "block_type", postgresql_where=text("block_type = 'mermaid'"))Note.__table_args__includesIndex("ix_notes_note_type_architecture", "note_type", postgresql_where=text("note_type = 'architecture'"))alembic checkpasses (no drift detected)Related
project-pal-e-platform— platform projectforgejo_admin/pal-e-api #253— the PR that added the migration without model declarationsforgejo_admin/pal-e-api #261— prior CI fix in this chain