Contrast-Security-OSS / cassandra-migration

Database migration (evolution) tool for Apache Cassandra
Apache License 2.0
107 stars 51 forks source link

Support escaped keyspace names #26

Open swalendzik opened 7 years ago

swalendzik commented 7 years ago

Current version does not support keyspace names that starts with numbers and have to escaped Example keyspace 111_test have to be passed as parameter -Dcassandra.migration.keyspace.name=\"111_test\" and it fails at this check for (KeyspaceMetadata keyspaceMetadata : keyspaces) { if (keyspace.getName().equalsIgnoreCase(keyspaceMetadata.getName())) keyspaceExists = true; } if (keyspaceExists) session.execute("USE " + keyspace.getName()); else throw new CassandraMigrationException("Keyspace: " + keyspace.getName() + " does not exist.");