gabriel / musehub public
0049_proposal_snapshot_anchors.py python
33 lines 824 B
Raw
sha256:7d6dd8f4a89e2d1fef2d84f6e65feaff51385d382f466766b7f690a22ec18e32 fix: fall back to DB ancestry check when mpack-only fast-fo… Sonnet 4.6 patch 6 days ago
1 """Add from_snapshot_id and to_snapshot_id to musehub_proposals.
2
3 Captures the HEAD commit ID of each branch at proposal creation time,
4 providing cryptographic anchors for FROM STATE and TO STATE.
5
6 Revision ID: 0049
7 Revises: 0048
8 """
9 from __future__ import annotations
10
11 import sqlalchemy as sa
12 from alembic import op
13
14 revision: str = "0049"
15 down_revision: str = "0048"
16 branch_labels = None
17 depends_on = None
18
19
20 def upgrade() -> None:
21 op.add_column(
22 "musehub_proposals",
23 sa.Column("from_snapshot_id", sa.String(128), nullable=True),
24 )
25 op.add_column(
26 "musehub_proposals",
27 sa.Column("to_snapshot_id", sa.String(128), nullable=True),
28 )
29
30
31 def downgrade() -> None:
32 op.drop_column("musehub_proposals", "to_snapshot_id")
33 op.drop_column("musehub_proposals", "from_snapshot_id")
File History 1 commit
sha256:7d6dd8f4a89e2d1fef2d84f6e65feaff51385d382f466766b7f690a22ec18e32 fix: fall back to DB ancestry check when mpack-only fast-fo… Sonnet 4.6 patch 6 days ago