Skip to content

Commit

Permalink
Do not create Cassandra index if it already exists (#782)
Browse files Browse the repository at this point in the history
This prevents schema upgrades or re-executions from failing.

Signed-off-by: Greg Swift <gregswift@gmail.com>
  • Loading branch information
gregswift authored and yurishkuro committed Apr 23, 2018
1 parent cfb68d6 commit ddaf483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/storage/cassandra/schema/v001.cql.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@ CREATE TABLE IF NOT EXISTS ${keyspace}.dependencies (
}
AND default_time_to_live = ${dependencies_ttl};

CREATE CUSTOM INDEX ON ${keyspace}.dependencies (ts_index)
CREATE CUSTOM INDEX IF NOT EXISTS ON ${keyspace}.dependencies (ts_index)
USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = {'mode': 'SPARSE'};

0 comments on commit ddaf483

Please sign in to comment.