From 17d96c77e64025ed8fe2b272c6c5e726e58687d9 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Mon, 28 Oct 2024 10:48:19 +0800 Subject: [PATCH] rename db id to pk --- kong/db/migrations/core/024_370_to_380.lua | 2 +- spec/05-migration/db/migrations/core/024_370_to_380_spec.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kong/db/migrations/core/024_370_to_380.lua b/kong/db/migrations/core/024_370_to_380.lua index 9d78807962cf..eb145db78339 100644 --- a/kong/db/migrations/core/024_370_to_380.lua +++ b/kong/db/migrations/core/024_370_to_380.lua @@ -9,7 +9,7 @@ return { CREATE TABLE IF NOT EXISTS clustering_sync_delta ( "version" INT NOT NULL, "type" TEXT NOT NULL, - "id" UUID NOT NULL, + "pk" UUID NOT NULL, "ws_id" UUID NOT NULL, "row" JSON, FOREIGN KEY (version) REFERENCES clustering_sync_version(version) ON DELETE CASCADE diff --git a/spec/05-migration/db/migrations/core/024_370_to_380_spec.lua b/spec/05-migration/db/migrations/core/024_370_to_380_spec.lua index 0563c4c83f80..f17c9d48879b 100644 --- a/spec/05-migration/db/migrations/core/024_370_to_380_spec.lua +++ b/spec/05-migration/db/migrations/core/024_370_to_380_spec.lua @@ -10,7 +10,7 @@ describe("database migration", function() assert.database_has_relation("clustering_sync_delta") assert.table_has_column("clustering_sync_delta", "version", "integer") assert.table_has_column("clustering_sync_delta", "type", "text") - assert.table_has_column("clustering_sync_delta", "id", "uuid") + assert.table_has_column("clustering_sync_delta", "pk", "uuid") assert.table_has_column("clustering_sync_delta", "ws_id", "uuid") assert.table_has_column("clustering_sync_delta", "row", "json") end)