"""stable_last_changed_commit Adds ``last_changed_commit`` VARCHAR(128) column to ``musehub_intel_stable`` so each stable-symbol row carries the commit ID that last modified the symbol. NULL means the symbol has never been modified (since_start=True cases) or the data was written before this migration. Revision ID: 0008 Revises: 0007 Create Date: 2026-05-03 00:00:00.000000+00:00 """ from __future__ import annotations from typing import Sequence, Union import sqlalchemy as sa from alembic import op revision: str = "0008" down_revision: Union[str, None] = "0007" branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: op.add_column( "musehub_intel_stable", sa.Column("last_changed_commit", sa.String(128), nullable=True), ) def downgrade() -> None: op.drop_column("musehub_intel_stable", "last_changed_commit")