From 52ddbe73774f67f56825fe3118557b6a213bffef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Thu, 21 May 2026 20:11:57 +0200 Subject: [PATCH] fix(migrate): use relname not table_name in pg_stat_user_tables query pg_stat_user_tables uses relname, not table_name. The wrong column caused the row-count verification step to abort with ERROR: column does not exist. Co-Authored-By: Claude Opus 4.7 --- tooling/migrate/rename-to-nexus.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tooling/migrate/rename-to-nexus.sh b/tooling/migrate/rename-to-nexus.sh index 3e08ab9..f3f57d5 100755 --- a/tooling/migrate/rename-to-nexus.sh +++ b/tooling/migrate/rename-to-nexus.sh @@ -63,7 +63,7 @@ docker compose -p "$OLD_PROJECT" -f "$COMPOSE_FILE" stop app 2>/dev/null || true echo "[2/7] Capturing pre-rename row counts..." PRE_COUNTS=$(docker compose -p "$OLD_PROJECT" -f "$COMPOSE_FILE" exec -T postgres \ psql -U capakraken -d capakraken -t -c \ - "SELECT table_name, n_live_tup FROM pg_stat_user_tables ORDER BY table_name;") + "SELECT relname, n_live_tup FROM pg_stat_user_tables ORDER BY relname;") echo "$PRE_COUNTS" | head -20 echo "..." @@ -149,7 +149,7 @@ sleep 15 echo "=== Verification ===" POST_COUNTS=$(docker compose -p "$NEW_PROJECT" -f "$COMPOSE_FILE" exec -T postgres \ psql -U nexus -d nexus -t -c \ - "SELECT table_name, n_live_tup FROM pg_stat_user_tables ORDER BY table_name;") + "SELECT relname, n_live_tup FROM pg_stat_user_tables ORDER BY relname;") echo "Post-rename row counts (sample):" echo "$POST_COUNTS" | head -20