From 9f8cd29705b910a33036a0d54a8a5fa47b5d807f Mon Sep 17 00:00:00 2001 From: chronolaw Date: Fri, 20 Sep 2024 21:48:08 +0800 Subject: [PATCH] migration test --- .../db/migrations/core/024_370_to_380_spec.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/05-migration/db/migrations/core/024_370_to_380_spec.lua 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 new file mode 100644 index 00000000000..e26f1868587 --- /dev/null +++ b/spec/05-migration/db/migrations/core/024_370_to_380_spec.lua @@ -0,0 +1,17 @@ +local uh = require "spec/upgrade_helpers" + +describe("database migration", function() + uh.old_after_up("has created the \"clustering_sync_version\" table", function() + assert.database_has_relation("clustering_sync_version") + assert.table_has_column("clustering_sync_version", "version", "serial") + end) + + uh.old_after_up("has created the \"clustering_sync_delta\" table", function() + assert.database_has_relation("clustering_sync_delta") + assert.table_has_column("clustering_sync_delta", "version", "int") + 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", "ws_id", "uuid") + assert.table_has_column("clustering_sync_delta", "row", "json") + end) +end)