gabriel / musehub public
0016_refactor_events_commit_message.py python
40 lines 1.1 KB
Raw
sha256:bba4b69de173366aeb7d490d687ccffb6db9726374033addece89cf2b87642d8 docs: add production launch discovery report and infra laun… Sonnet 5 8 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:bba4b69de173366aeb7d490d687ccffb6db9726374033addece89cf2b87642d8 docs: add production launch discovery report and infra laun… Sonnet 5 8 days ago
sha256:eb0928124669c933c0ef852bea1ad0c56649cf21bd7e9663c3b51004771b0591 docs: add MuseHub cloud identity/AWS operating model and Go… Sonnet 5 patch 8 days ago