0016_refactor_events_commit_message.py
python
sha256:969ddc5e88776e70af33c016b8777bb721356508ae5f304b3fb46c451494ece7
test(mwp3): Phase 4 — fix adjacent suite regressions, lock …
Sonnet 4.6
22 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:969ddc5e88776e70af33c016b8777bb721356508ae5f304b3fb46c451494ece7
test(mwp3): Phase 4 — fix adjacent suite regressions, lock …
Sonnet 4.6
22 days ago
sha256:1749b9cc5cd2583c56d3261c4c00a342c27435f3946d4bc3e70f76aa2795458a
docs(mwp-3): TDD implementation plan for job-enqueue idempo…
Opus 4.8
22 days ago