"""Add marketplace_domain_id to musehub_repos musehub#117 Phase 3 (DOM_12): a repo needs a real, unambiguous link to a registered marketplace MusehubDomain, deliberately separate from the existing domain_id column (a plain VCS-plugin category string load-bearing for the profile heatmap — see musehub_profile.py's active guard against a real marketplace ID leaking into it). Revision ID: 0074 Revises: 0073 """ from __future__ import annotations from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = '0074' down_revision: Union[str, None] = '0073' branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: op.add_column('musehub_repos', sa.Column('marketplace_domain_id', sa.String(length=128), nullable=True)) op.create_index( op.f('ix_musehub_repos_marketplace_domain_id'), 'musehub_repos', ['marketplace_domain_id'], unique=False, ) def downgrade() -> None: op.drop_index(op.f('ix_musehub_repos_marketplace_domain_id'), table_name='musehub_repos') op.drop_column('musehub_repos', 'marketplace_domain_id')