From c12d566c828d9e083bb8993c1966a4517b88aec1 Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Wed, 27 May 2026 10:00:09 +0200 Subject: [PATCH] hotfix(migrations): revert ce4307c SQL comment edits to restore sqlx hash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- node/migrations/0001_initial.sql | 4 ++-- node/migrations/0003_pending_inscriptions.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/node/migrations/0001_initial.sql b/node/migrations/0001_initial.sql index d20ef81d..51be7007 100644 --- a/node/migrations/0001_initial.sql +++ b/node/migrations/0001_initial.sql @@ -1,9 +1,9 @@ --- Initial Postgres schema for the zkCoins node state-layer. +-- Initial Postgres schema for the zkCoins server state-layer. -- -- This migration is part of PR-A1 in the 3-PR Postgres migration -- series (file-based bincode -> Postgres). The schema is installed -- by `db::connect_and_migrate`; nothing here is wired into the --- node bootstrap yet — that happens in PR-A2 (state + latest block) +-- server bootstrap yet — that happens in PR-A2 (state + latest block) -- and PR-A3 (accounts + usernames). -- -- Design notes: diff --git a/node/migrations/0003_pending_inscriptions.sql b/node/migrations/0003_pending_inscriptions.sql index 16c46808..216e8c5c 100644 --- a/node/migrations/0003_pending_inscriptions.sql +++ b/node/migrations/0003_pending_inscriptions.sql @@ -41,7 +41,7 @@ -- instead of a silent state-machine drift. -- * The partial index on `status <> 'complete'` keeps the resumer's -- boot-time scan O(pending) instead of O(total). After enough --- mints this list will be perpetually empty on a healthy node. +-- mints this list will be perpetually empty on a healthy server. CREATE TABLE pending_inscriptions ( id BIGSERIAL PRIMARY KEY,