From b988ea8788427f8852e0ba805ed53ae6be7a798c Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 11 May 2026 16:14:37 +0200 Subject: [PATCH] loopdb: lowercase protocol_version column in migration 14 Migration 000014_reservation_protocol_version used 'protocol_Version' (capital V) in the ADD COLUMN / DROP COLUMN statements. Postgres folds unquoted identifiers to lowercase and SQLite is case-insensitive on identifier comparison, so the running schema column is 'protocol_version' either way -- but the sqlc-generated Go (loopdb/sqlc/reservations.sql.go) also uses the lowercase form, so the file as written was both unusual and inconsistent with its own generated SQL. Use 'protocol_version' everywhere. No data migration is required; the column on disk is unchanged. Pure cosmetic / portability fix. --- .../migrations/000014_reservation_protocol_version.down.sql | 2 +- .../sqlc/migrations/000014_reservation_protocol_version.up.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/loopdb/sqlc/migrations/000014_reservation_protocol_version.down.sql b/loopdb/sqlc/migrations/000014_reservation_protocol_version.down.sql index d23af75e..ca38f26a 100644 --- a/loopdb/sqlc/migrations/000014_reservation_protocol_version.down.sql +++ b/loopdb/sqlc/migrations/000014_reservation_protocol_version.down.sql @@ -1,3 +1,3 @@ -- protocol_version is used to determine the version of the reservation protocol -- that was used to create the reservation. -ALTER TABLE reservations DROP COLUMN protocol_Version; +ALTER TABLE reservations DROP COLUMN protocol_version; diff --git a/loopdb/sqlc/migrations/000014_reservation_protocol_version.up.sql b/loopdb/sqlc/migrations/000014_reservation_protocol_version.up.sql index 29da580a..464590ab 100644 --- a/loopdb/sqlc/migrations/000014_reservation_protocol_version.up.sql +++ b/loopdb/sqlc/migrations/000014_reservation_protocol_version.up.sql @@ -1,3 +1,3 @@ -- protocol_version is used to determine the version of the reservation protocol -- that was used to create the reservation. -ALTER TABLE reservations ADD COLUMN protocol_Version INTEGER NOT NULL DEFAULT 0; \ No newline at end of file +ALTER TABLE reservations ADD COLUMN protocol_version INTEGER NOT NULL DEFAULT 0; \ No newline at end of file