0074_add_repo_marketplace_domain_id.py
python
sha256:34035d72cef530c1ab9d6a6f53be18d803dde705fc3157617d70352a96d0747b
Merge branch 'fix/wire-push-external-parent-manifest' into dev
Human
8 days ago
| 1 | """Add marketplace_domain_id to musehub_repos |
| 2 | |
| 3 | musehub#117 Phase 3 (DOM_12): a repo needs a real, unambiguous link to a |
| 4 | registered marketplace MusehubDomain, deliberately separate from the |
| 5 | existing domain_id column (a plain VCS-plugin category string load-bearing |
| 6 | for the profile heatmap — see musehub_profile.py's active guard against a |
| 7 | real marketplace ID leaking into it). |
| 8 | |
| 9 | Revision ID: 0074 |
| 10 | Revises: 0073 |
| 11 | """ |
| 12 | from __future__ import annotations |
| 13 | |
| 14 | from typing import Sequence, Union |
| 15 | |
| 16 | from alembic import op |
| 17 | import sqlalchemy as sa |
| 18 | |
| 19 | |
| 20 | # revision identifiers, used by Alembic. |
| 21 | revision: str = '0074' |
| 22 | down_revision: Union[str, None] = '0073' |
| 23 | branch_labels: Union[str, Sequence[str], None] = None |
| 24 | depends_on: Union[str, Sequence[str], None] = None |
| 25 | |
| 26 | |
| 27 | def upgrade() -> None: |
| 28 | op.add_column('musehub_repos', sa.Column('marketplace_domain_id', sa.String(length=128), nullable=True)) |
| 29 | op.create_index( |
| 30 | op.f('ix_musehub_repos_marketplace_domain_id'), |
| 31 | 'musehub_repos', ['marketplace_domain_id'], unique=False, |
| 32 | ) |
| 33 | |
| 34 | |
| 35 | def downgrade() -> None: |
| 36 | op.drop_index(op.f('ix_musehub_repos_marketplace_domain_id'), table_name='musehub_repos') |
| 37 | op.drop_column('musehub_repos', 'marketplace_domain_id') |
File History
3 commits
sha256:34035d72cef530c1ab9d6a6f53be18d803dde705fc3157617d70352a96d0747b
Merge branch 'fix/wire-push-external-parent-manifest' into dev
Human
8 days ago
sha256:fc04e4cae9e1774d6a21b65c45daeed0e6787eb581d13aa1b03bfe9384a34226
Merge branch 'fix/two-column-scroll-layout' into dev
Human
8 days ago
sha256:408916fc5973ba59c6e4eebaa80ebdcc801c0a63205651e25009d11548f79454
chore: bump version to 0.2.0.dev2 — nightly.2, matching muse
Sonnet 4.6
patch
11 days ago