gabriel / musehub public
refactor BREAKING task/test-suite-fixes #7 / 12
AI Agent gabriel · 148 days ago · Apr 27, 2026 · Diff

refactor: consolidate 6 migrations into single autogenerated 0001_consolidated_schema

Replace the prior chain (create_schema + 4 additive migrations + 2 backfill migrations) with a single Alembic-autogenerated migration from current ORM models. Eliminates the downgrade conflict where 0022's IF EXISTS drops raced with create_schema's non-conditional drops.

Local production DB stamped to 0001 (alembic_version row updated directly); 24 existing issues and all data preserved untouched.

sha256:c43b0a15518cab4ac039ff8361c7ff4c8f9da62bf85a01f5db29eade025392ec sha
+5 ~27 −58 symbols
sha256:2b1f0a8a90cc36a8bb4b247f38bf48cea9dbfba7ff0ed7d9ac47a859556ebcc4 snapshot
+5
symbols added
~27
symbols modified
−58
symbols removed
0
dead code introduced
Semantic Changes 90 symbols
branch_labels variable variable branch_labels L17–17
depends_on variable variable depends_on L18–18
down_revision variable variable down_revision L16–16
downgrade function function downgrade L36–39
annotations import import annotations L10–10
op import import op L12–12
sa import import sa L13–13
revision variable variable revision L15–15
upgrade function function upgrade L21–33
branch_labels variable variable branch_labels L19–19
depends_on variable variable depends_on L20–20
down_revision variable variable down_revision L18–18
downgrade function function downgrade L692–837
Sequence import import Sequence L10–10
Union import import Union L10–10
annotations import import annotations L8–8
op import import op L12–12
sa import import sa L13–13
revision variable variable revision L17–17
upgrade function function upgrade L23–688
branch_labels variable variable branch_labels L17–17
depends_on variable variable depends_on L18–18
down_revision variable variable down_revision L16–16
downgrade function function downgrade L32–40
Sequence import import Sequence L10–10
Union import import Union L10–10
annotations import import annotations L8–8
op import import op L13–13
sa import import sa L12–12
revision variable variable revision L15–15
upgrade function function upgrade L21–29
_COLUMNS variable variable _COLUMNS L20–34
branch_labels variable variable branch_labels L17–17
depends_on variable variable depends_on L18–18
down_revision variable variable down_revision L16–16
downgrade function function downgrade L46–52
Sequence import import Sequence L10–10
Union import import Union L10–10
annotations import import annotations L8–8
op import import op L13–13
sa import import sa L12–12
revision variable variable revision L15–15
upgrade function function upgrade L37–43
branch_labels variable variable branch_labels L17–17
depends_on variable variable depends_on L18–18
down_revision variable variable down_revision L16–16
downgrade function function downgrade L54–56
Sequence import import Sequence L10–10
Union import import Union L10–10
annotations import import annotations L8–8
op import import op L13–13
sa import import sa L12–12 → moved to alembic/versions/0001_consolidated_schema.py
revision variable variable revision L15–15
upgrade function function upgrade L21–51
~ tests/test_migrations.py .py 4 symbols added, 4 symbols removed, 24 symbols modified
test_identity_row_survives_upgrade_chain method method test_identity_row_survives_upgrade_chain L421–449
test_repo_data_survives_incremental_upgrade method method test_repo_data_survives_incremental_upgrade L390–419
test_all_47_migrations_present method method test_all_47_migrations_present L268–271
test_head_revision_is_0047 method method test_head_revision_is_0047 L273–293
+ test_identity_row_persists_at_head method method test_identity_row_persists_at_head L415–442
+ test_repo_data_persists_at_head method method test_repo_data_persists_at_head L385–413
+ test_all_migrations_present method method test_all_migrations_present L261–266
+ test_head_revision_is_correct method method test_head_revision_is_correct L268–288
~ _HEAD
~ alembic/versions/0001_consolidated_schema.py .py moved from alembic/versions/0022_composite_indexes.py; 1 added, 3 modified
+ sa import import sa L8–8 ← moved from alembic/versions/20260426_1200_b7c8d9e0f1a2_add_bridge_mirrors_table.py

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:c43b0a15518cab4ac039ff8361c7ff4c8f9da62bf85a01f5db29eade025392ec --body "your comment"