Skip to content

Commit

Permalink
fix(migrations) correct C* statements related to indexes
Browse files Browse the repository at this point in the history
- adding IF EXISTS on DROP INDEX
- correct name of the keyspace in the 'down' section

Note: those fixes are performed on _old_ migrations (pre 1.0)

From #4020
  • Loading branch information
kikito authored and thibaultcha committed Nov 26, 2018
1 parent c4d6716 commit 043e5f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kong/dao/migrations/cassandra.lua
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ return {
ALTER TABLE apis ADD http_if_terminated boolean;
]],
down = [[
DROP INDEX ssl_servers_names_ssl_certificate_idx;
DROP INDEX ssl_servers_names_ssl_certificate_id_idx;
DROP TABLE ssl_certificates;
DROP TABLE ssl_servers_names;
Expand Down Expand Up @@ -742,7 +742,7 @@ return {
},
{ name = "2018-03-27-002500_drop_old_ssl_tables",
up = [[
DROP INDEX ssl_servers_names_ssl_certificate_id_idx;
DROP INDEX IF EXISTS ssl_servers_names_ssl_certificate_id_idx;
DROP TABLE ssl_certificates;
DROP TABLE ssl_servers_names;
]],
Expand Down

0 comments on commit 043e5f8

Please sign in to comment.