"""detect-refactor: add commit_message column and composite kind index ``commit_message`` lets the UI display the commit that introduced each refactoring event without a separate join or subprocess call. The composite index ``ix_intel_refactor_events_repo_kind`` on ``(repo_id, kind)`` accelerates per-kind filtering used by the intel/detect-refactor page (implementation / signature / move / rename). Revision ID: 0016 Revises: 0015 """ from alembic import op import sqlalchemy as sa revision = "0016" down_revision = "0015" branch_labels = None depends_on = None def upgrade() -> None: op.add_column( "musehub_intel_refactor_events", sa.Column("commit_message", sa.Text, nullable=True), ) op.create_index( "ix_intel_refactor_events_repo_kind", "musehub_intel_refactor_events", ["repo_id", "kind"], ) def downgrade() -> None: op.drop_index( "ix_intel_refactor_events_repo_kind", table_name="musehub_intel_refactor_events", ) op.drop_column("musehub_intel_refactor_events", "commit_message")