gabriel / musehub public
0074_add_repo_marketplace_domain_id.py python
37 lines 1.2 KB
Raw
sha256:cfefc25a166c3c3eed8ea3529aee19ea350bc05f2954d007420e924133b7d8ce chore: pivot to nightly channel — bump version to 0.2.0.dev… Sonnet 5 patch 13 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 1 commit
sha256:cfefc25a166c3c3eed8ea3529aee19ea350bc05f2954d007420e924133b7d8ce chore: pivot to nightly channel — bump version to 0.2.0.dev… Sonnet 5 patch 13 days ago