gabriel / musehub public
feat patch db dev
gabriel · 162 days ago · Apr 16, 2026 · Diff

feat(db): backfill sha256: prefix on all bare-hex content-addressed IDs (0051)

Adds alembic migration 0051 which canonicalizes every object ID stored in the database to the sha256:<hex> format used by the new genesis-addressed ID scheme.

Tables updated: - musehub_objects.object_id (PK): delete duplicates where sha256: row already exists from post-migration pushes, then rename bare-hex remainder - musehub_object_refs.object_id (FK): same duplicate-drop + rename - musehub_snapshots.snapshot_id (PK): rename bare-hex remainder - musehub_commits.commit_id (PK): rename bare-hex remainder - musehub_commits.snapshot_id (FK): update to sha256: prefix - musehub_branches.head_commit_id (FK): update to sha256: prefix

FK triggers are disabled per-table for the duration so PKs and FKs can be updated independently in a single transaction.

sha256:c29912e20e7ef7c3f79060db6ea7a181d2930c7234b62012fb22b8a73721fb40 sha
+8 symbols
sha256:3e11dabbff20e8850b51363a35076b658a1c8592baf004e8109693949d3dae0e snapshot
+8
symbols added
0
dead code introduced
Semantic Changes 8 symbols
+ branch_labels variable variable branch_labels L31–31
+ depends_on variable variable depends_on L32–32
+ down_revision variable variable down_revision L30–30
+ downgrade function function downgrade L133–177
+ annotations import import annotations L25–25
+ op import import op L27–27
+ revision variable variable revision L29–29
+ upgrade function function upgrade L35–130
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:c29912e20e7ef7c3f79060db6ea7a181d2930c7234b62012fb22b8a73721fb40 --body "your comment"