Skip to content

Commit 514601a

Browse files
committed
fix(migrations) remove unnecessary postgres index on workspaces table
### Summary This removes possibly existing index from users that have used an older version of `2.1.0` migrations that added additional index on `unique` column, which is not necessary as unique constraint already adds an index.
1 parent 61372e1 commit 514601a

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

kong-2.1.2-0.rockspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ build = {
198198
["kong.db.migrations.core.008_150_to_200"] = "kong/db/migrations/core/008_150_to_200.lua",
199199
["kong.db.migrations.core.009_200_to_210"] = "kong/db/migrations/core/009_200_to_210.lua",
200200
["kong.db.migrations.core.010_210_to_211"] = "kong/db/migrations/core/010_210_to_211.lua",
201+
["kong.db.migrations.core.011_212_to_213"] = "kong/db/migrations/core/011_212_to_213.lua",
201202
["kong.db.migrations.operations.200_to_210"] = "kong/db/migrations/operations/200_to_210.lua",
202203
["kong.db.migrations.operations.210_to_211"] = "kong/db/migrations/operations/210_to_211.lua",
203204

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
return {
2+
postgres = {
3+
up = [[
4+
-- Unique constraint on "name" already adds btree index
5+
DROP INDEX IF EXISTS "workspaces_name_idx";
6+
]],
7+
},
8+
cassandra = {
9+
up = [[]],
10+
}
11+
}

kong/db/migrations/core/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ return {
88
"008_150_to_200",
99
"009_200_to_210",
1010
"010_210_to_211",
11+
"011_212_to_213",
1112
}

0 commit comments

Comments
 (0)