gabriel / musehub public
0049_proposal_snapshot_anchors.py python
33 lines 824 B
Raw
sha256:969ddc5e88776e70af33c016b8777bb721356508ae5f304b3fb46c451494ece7 test(mwp3): Phase 4 — fix adjacent suite regressions, lock … Sonnet 4.6 22 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 2 commits
sha256:969ddc5e88776e70af33c016b8777bb721356508ae5f304b3fb46c451494ece7 test(mwp3): Phase 4 — fix adjacent suite regressions, lock … Sonnet 4.6 22 days ago
sha256:1749b9cc5cd2583c56d3261c4c00a342c27435f3946d4bc3e70f76aa2795458a docs(mwp-3): TDD implementation plan for job-enqueue idempo… Opus 4.8 22 days ago