0053_snapshot_manifest_blob_nullable.py
python
sha256:94ef169c149a452bff7c604ded8b280b19bd477c2dabcb56972780b0b784c7aa
Merge 'fix/assignee-sigil-inline' into 'dev' — proposal: As…
Human
12 days ago
| 1 | """Make musehub_snapshots.manifest_blob nullable. |
| 2 | |
| 3 | snapshot_id = sha256(sorted manifest entries) — the ID is the proof. |
| 4 | Snapshots pushed via the delta-mpack path store manifest_blob=NULL; |
| 5 | the manifest can be reconstructed from the delta chain in MinIO. |
| 6 | |
| 7 | Revision ID: 0053 |
| 8 | Revises: 0052 |
| 9 | """ |
| 10 | from __future__ import annotations |
| 11 | |
| 12 | import sqlalchemy as sa |
| 13 | from alembic import op |
| 14 | |
| 15 | |
| 16 | revision: str = "0053" |
| 17 | down_revision: str = "0052" |
| 18 | branch_labels = None |
| 19 | depends_on = None |
| 20 | |
| 21 | |
| 22 | def upgrade() -> None: |
| 23 | op.alter_column( |
| 24 | "musehub_snapshots", |
| 25 | "manifest_blob", |
| 26 | existing_type=sa.LargeBinary(), |
| 27 | nullable=True, |
| 28 | ) |
| 29 | |
| 30 | |
| 31 | def downgrade() -> None: |
| 32 | op.execute( |
| 33 | "UPDATE musehub_snapshots SET manifest_blob = '\\x80' WHERE manifest_blob IS NULL" |
| 34 | ) |
| 35 | op.alter_column( |
| 36 | "musehub_snapshots", |
| 37 | "manifest_blob", |
| 38 | existing_type=sa.LargeBinary(), |
| 39 | nullable=False, |
| 40 | ) |
File History
3 commits
sha256:94ef169c149a452bff7c604ded8b280b19bd477c2dabcb56972780b0b784c7aa
Merge 'fix/assignee-sigil-inline' into 'dev' — proposal: As…
Human
12 days ago
sha256:6b1949fc2797ca4c1936a637a4cbfec828ef56cf52398a2e74ca3c4f494e728f
fix: use wire_bytes not mpack_bytes_raw in compute_object_b…
Sonnet 4.6
patch
21 days ago
sha256:4aed3d8601c8dd3ed37074de35f11f4a9699a0a4b99d43727048fd3f8e6fd13d
chore: doc sweep, ignore wrangler build state, misc fixes
Sonnet 4.6
minor
⚠
23 days ago