Skip to content

Commit 3f3dcce

Browse files
author
Mark Markaryan
authored
Don't fail if schema_version and schema_update_history tables already exist (#697)
1 parent 96ca34e commit 3f3dcce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/cassandra/cqlclient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ const (
7474
writeSchemaVersionCQL = `INSERT into schema_version(keyspace_name, creation_time, curr_version, min_compatible_version) VALUES (?,?,?,?)`
7575
writeSchemaUpdateHistoryCQL = `INSERT into schema_update_history(year, month, update_time, old_version, new_version, manifest_md5, description) VALUES(?,?,?,?,?,?,?)`
7676

77-
createSchemaVersionTableCQL = `CREATE TABLE schema_version(keyspace_name text PRIMARY KEY, ` +
77+
createSchemaVersionTableCQL = `CREATE TABLE IF NOT EXISTS schema_version(keyspace_name text PRIMARY KEY, ` +
7878
`creation_time timestamp, ` +
7979
`curr_version text, ` +
8080
`min_compatible_version text);`
8181

82-
createSchemaUpdateHistoryTableCQL = `CREATE TABLE schema_update_history(` +
82+
createSchemaUpdateHistoryTableCQL = `CREATE TABLE IF NOT EXISTS schema_update_history(` +
8383
`year int, ` +
8484
`month int, ` +
8585
`update_time timestamp, ` +

0 commit comments

Comments
 (0)