gabriel / musehub public
0049_proposal_snapshot_anchors.py python
33 lines 824 B
Raw
sha256:3ff9c9863a9891bdcde71b4a43228f66d0493e38b7cc1d09fe9eb7de774046b2 feat: add repair-commit wire endpoint (API parity with repa… Opus 4.8 minor ⚠ breaking 1 day 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:3ff9c9863a9891bdcde71b4a43228f66d0493e38b7cc1d09fe9eb7de774046b2 feat: add repair-commit wire endpoint (API parity with repa… Opus 4.8 minor 1 day ago