Skip to content

fix(dolt): complete schema_version upgrades#2635

Closed
garitar wants to merge 1 commit intosteveyegge:mainfrom
Algorune:codex/fix-schema-version-upgrade-path
Closed

fix(dolt): complete schema_version upgrades#2635
garitar wants to merge 1 commit intosteveyegge:mainfrom
Algorune:codex/fix-schema-version-upgrade-path

Conversation

@garitar
Copy link
Contributor

@garitar garitar commented Mar 16, 2026

Summary

  • bump the Dolt-backed currentSchemaVersion to 8 so repos one version behind actually re-run the latest migration-backed columns
  • commit the final config.schema_version update so repos do not stay dirty in dolt_status after init/upgrade
  • add regression coverage for both the one-version-behind migration case and the clean-working-set expectation

Fixes #2634.
Related overlap: #2632 covers embedded Dolt schema files only; this PR fixes the Dolt-backed repo upgrade path and schema-version bookkeeping.

Validation

  • go test ./internal/storage/dolt -run '^(TestSchemaVersionSetAfterInit|TestSchemaVersionRunsLatestMigrationsWhenOneVersionBehind|TestSchemaVersionRunsInitWhenStale)$' -count=1

@codecov-commenter
Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4805 1 4804 549
View the top 1 failed test(s) by shortest run time
github.com/steveyegge/beads/cmd/bd::TestGetVersionsSinceOrder
Stack Traces | 0s run time
=== RUN   TestGetVersionsSinceOrder
    version_tracking_test.go:80: Versions not in chronological order: 0.61.0 (2026-03-15) should come before 0.57.0 (2026-03-01)
--- FAIL: TestGetVersionsSinceOrder (0.00s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Contributor

@DreadPirateRobertz DreadPirateRobertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix for #2634 — bumps schema version to 8 and adds regression tests verifying that (1) one-version-behind databases get the latest migrations re-applied, and (2) config table isn't left dirty in dolt_status after schema init. LGTM.

steveyegge added a commit that referenced this pull request Mar 17, 2026
Existing databases at schema version 7 were skipping the no_history
migration. Bumping to 8 forces re-initialization. Also commits the
schema_version update so repos don't stay dirty in dolt_status.

Co-Authored-By: garitar <garitar@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@steveyegge
Copy link
Owner

Fix-merged to main in e2f9f51. Thank you @garitar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dolt: schema_version upgrade path can miss no_history and leave config dirty

4 participants