fix: add partial index declarations to Block and Note models #264
No reviewers
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!264
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "263-fix-add-partial-index-declarations-to-bl"
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?
Summary
Adds missing partial index declarations to the Block and Note SQLAlchemy models so they match the indexes already present in the database (created by migration u1p2q3r4s5t6). This resolves
alembic checkdrift detection that was failing CI.Changes
src/pal_e_docs/models.py: Addedtextto sqlalchemy importssrc/pal_e_docs/models.py: Added__table_args__to Note class withix_notes_note_type_architecturepartial indexsrc/pal_e_docs/models.py: Addedix_blocks_block_type_mermaidpartial index to Block__table_args__Test Plan
ruff checkandruff format --checkpassfrom pal_e_docs.models import Block, Noteimports successfullyalembic checkshould no longer detect drift for these indexesReview Checklist
Related Notes
Related
Closes #263
QA Review -- PR #264
Summary
Single-file change (13 additions, 0 deletions) to
src/pal_e_docs/models.py. Adds two partial index declarations to SQLAlchemy models that match existing database indexes from migrationu1p2q3r4s5t6.Findings
Code quality: PASS
textimport added correctly to the existing sqlalchemy import blockix_notes_note_type_architecturepartial index added toNote.__table_args__with correctpostgresql_whereclauseix_blocks_block_type_mermaidpartial index added toBlock.__table_args__with correctpostgresql_whereclause__table_args__tuples is correct (trailing comma preserved, UniqueConstraint stays last in Block)Linting: PASS
ruff checkpassesruff format --checkpassesImport verification: PASS
from pal_e_docs.models import Block, NotesucceedsSOP compliance: PASS
{issue-number}-{kebab-case}conventionCloses #263present for auto-closeNo issues found
This is a minimal, correct fix that brings the ORM model declarations into alignment with the existing database schema.
VERDICT: APPROVED