hotfix(migration): revert SQL comment edit (sqlx hash stable) - #95
Merged
Conversation
The rename PR (#93) edited two comment lines in node/migrations/0001_initial.sql ("zkCoins server state-layer" → "zkCoins node state-layer" and "server bootstrap" → "node bootstrap"). sqlx::migrate! hashes the entire file content, so the hash drifted — on startup the server panics with `Migrate(VersionMismatch(1))` because the `_sqlx_migrations` row on PRD/DEV still carries the pre-rename hash. Reverting the two comments restores the original hash and the migration is considered already-applied as intended. Cosmetic prose updates to migration files are out of bounds; the historical accuracy ("server" was the name when the schema landed) is the correct value anyway.
TaprootFreak
added a commit
that referenced
this pull request
May 27, 2026
…hash (#125) After #117 merged to develop the dfxdev container started crash-looping with `Migrate(VersionMismatch(1))` and the deploy-dev smoke test returned 502 for ~5 min straight before the workflow failed. Root cause: commit ce4307c ("docs(migrations): replace remaining 'server' with 'node' in SQL comments") edited the comment lines in the already-applied migrations `0001_initial.sql` and `0003_pending_inscriptions.sql`. sqlx hashes the migration file content (comments included), so a deployed DB whose `_sqlx_migrations.checksum` reflects the pre-edit text refuses to boot with the post-edit binary. This is the exact same class of issue that PR #95 already had to hotfix (`13155c1 hotfix(migration): revert SQL comment edit to keep sqlx hash stable`) and that `feedback_sqlx_migration_hash` documents. Fix: restore both files to their pre-ce4307c byte-for-byte content. Pure cosmetic revert — the only difference is "node" → "server" in 6 lines of `--` comments. No schema, no logic, no data change. The container's first boot after this lands will match its existing `_sqlx_migrations` row and proceed past the migrate step. If the "node" / "server" vocabulary is eventually wanted in the migration prose, the right move is a NEW migration whose comments use the chosen vocabulary — the old ones must stay frozen for the checksum to match deployed databases.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
PR #93 (rename: server → node) edited two prose comments in
`node/migrations/0001_initial.sql`. sqlx::migrate! hashes the
entire file, so the change drifted the migration hash. On startup
the server panics:
```
thread 'main' panicked at node/src/main.rs:68:14:
connect and migrate database: Migrate(VersionMismatch(1))
```
(Observed on `dev-api.zkcoins.app` in restart loop after the
cutover to `zkcoin/node:beta`.)
What
Revert the two comment lines. File is byte-identical to its pre-#93
state, hash matches `_sqlx_migrations.checksum` on DEV + PRD,
migration is considered already-applied, server boots.
Test
parses (no schema change).
restart loop ends, `dev-api.zkcoins.app/api/info` returns 200.