gabriel / musehub public
0016_refactor_events_commit_message.py python
40 lines 1.1 KB
Raw
sha256:1dd27e6d5c24550177b01b0a171e8375c07cf046b549e7683364706b6522d3bc docs(#139): mark all 11 checklist items resolved, document … Sonnet 5 12 days ago
1 """detect-refactor: add commit_message column and composite kind index
2
3 ``commit_message`` lets the UI display the commit that introduced each
4 refactoring event without a separate join or subprocess call.
5
6 The composite index ``ix_intel_refactor_events_repo_kind`` on
7 ``(repo_id, kind)`` accelerates per-kind filtering used by the
8 intel/detect-refactor page (implementation / signature / move / rename).
9
10 Revision ID: 0016
11 Revises: 0015
12 """
13
14 from alembic import op
15 import sqlalchemy as sa
16
17 revision = "0016"
18 down_revision = "0015"
19 branch_labels = None
20 depends_on = None
21
22
23 def upgrade() -> None:
24 op.add_column(
25 "musehub_intel_refactor_events",
26 sa.Column("commit_message", sa.Text, nullable=True),
27 )
28 op.create_index(
29 "ix_intel_refactor_events_repo_kind",
30 "musehub_intel_refactor_events",
31 ["repo_id", "kind"],
32 )
33
34
35 def downgrade() -> None:
36 op.drop_index(
37 "ix_intel_refactor_events_repo_kind",
38 table_name="musehub_intel_refactor_events",
39 )
40 op.drop_column("musehub_intel_refactor_events", "commit_message")
File History 2 commits
sha256:1dd27e6d5c24550177b01b0a171e8375c07cf046b549e7683364706b6522d3bc docs(#139): mark all 11 checklist items resolved, document … Sonnet 5 12 days ago
sha256:649011bedd713e22f7dca4c4be94bdefbf3b10950d9fc80235928d0b0b823be8 docs: track issue #139 (two-column app-shell refactor) plan… Sonnet 5 12 days ago