gabriel / musehub public
0026_drop_musehub_issue_labels.py python
36 lines 1.2 KB
Raw
sha256:3ff9c9863a9891bdcde71b4a43228f66d0493e38b7cc1d09fe9eb7de774046b2 feat: add repair-commit wire endpoint (API parity with repa… Opus 4.8 minor ⚠ breaking 1 day 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 1 commit
sha256:3ff9c9863a9891bdcde71b4a43228f66d0493e38b7cc1d09fe9eb7de774046b2 feat: add repair-commit wire endpoint (API parity with repa… Opus 4.8 minor 1 day ago