0026_drop_musehub_issue_labels.py
python
sha256:c73281cffffbc70487969720af074e54b34326d59ec6aff0827fa16512a4e512
docs(mwp-2): mark all acceptance criteria met; add closing …
Sonnet 4.6
25 days ago
| 1 | """Drop musehub_issue_labels — dead junction table. |
| 2 | |
| 3 | Issues store labels as a denormalized ARRAY(text) on musehub_issues.labels. |
| 4 | The musehub_issue_labels join table was created in anticipation of a |
| 5 | normalized approach that was never implemented — no service code ever |
| 6 | inserted into it, so it has always been empty. |
| 7 | |
| 8 | Proposals use the junction table correctly (musehub_proposal_labels) and |
| 9 | are unaffected by this change. |
| 10 | |
| 11 | Revision ID: 0026 |
| 12 | Revises: 0025 |
| 13 | """ |
| 14 | from __future__ import annotations |
| 15 | |
| 16 | import sqlalchemy as sa |
| 17 | from alembic import op |
| 18 | |
| 19 | revision = "0026" |
| 20 | down_revision = "0025" |
| 21 | branch_labels = None |
| 22 | depends_on = None |
| 23 | |
| 24 | |
| 25 | def upgrade() -> None: |
| 26 | op.drop_index("ix_musehub_issue_labels_label_id", table_name="musehub_issue_labels") |
| 27 | op.drop_table("musehub_issue_labels") |
| 28 | |
| 29 | |
| 30 | def downgrade() -> None: |
| 31 | op.create_table( |
| 32 | "musehub_issue_labels", |
| 33 | sa.Column("issue_id", sa.String(128), sa.ForeignKey("musehub_issues.issue_id", ondelete="CASCADE"), primary_key=True), |
| 34 | sa.Column("label_id", sa.String(128), sa.ForeignKey("musehub_labels.id", ondelete="CASCADE"), primary_key=True), |
| 35 | ) |
| 36 | op.create_index("ix_musehub_issue_labels_label_id", "musehub_issue_labels", ["label_id"]) |
File History
2 commits
sha256:c73281cffffbc70487969720af074e54b34326d59ec6aff0827fa16512a4e512
docs(mwp-2): mark all acceptance criteria met; add closing …
Sonnet 4.6
25 days ago
sha256:4dd2a937f66f8e36d9aa59bd1bf3cb880ca1d503fef67300a0cba3b482784081
test(mwp2): Phase 0 RED — reproduction tests for _walk_comm…
Sonnet 4.6
25 days ago