contrast-security-oss / cassandra-migration Goto Github PK
View Code? Open in Web Editor NEWDatabase migration (evolution) tool for Apache Cassandra
License: Apache License 2.0
Database migration (evolution) tool for Apache Cassandra
License: Apache License 2.0
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.");
I see that a custom Cluster/Keyspace class is used in the Java example. Is it possible to provide support for passing in a com.datastax.driver.core.Cluster which has already been configured for use?
Hello,
Post bee6eec commit, the build was not uploaded on maven repository.Hence, facing issue with using the library.
Kindly upload the latest build on maven repositoy.
Thanks a lot.
It would be more flexible to have a factory to instantiate the JavaMigration beans.
Nice project.
But there is a issue for using it for automation.
It requires to have keyspace created before migration, but how to create keyspace itself if I'm interested just for some quick check?
And for production yes, keyspace must be created by devops.
It's not actual issue for this project, but would be nice to have such feature for wide usage.
I would be helpfull to have a possibility to extract migrations from an IoC-container. It can be done by adding custom JavaMigrationResolver. So please make CassandraMigration.createMigrationResolver protected instead of private.
The objective is to help sysadmins track the changes over time without having to reference application code repository or inside the artifact.
The current version of this project is using cassandra-driver-core version 2.1.9, which is not compatible with Cassandra 3.x. Datastax has a driver compatibility matrix here: http://datastax.github.io/java-driver/manual/native_protocol/
It looks like the 3.x driver will support all versions of Cassandra, but the 2.1.x driver is not supported with Cassandra 3.x.
Is it possible to update the dependency of cassandra-driver-core to 3.x so we can use the latest version of Cassandra?
ConsistencyLevel.ALL requires that there's at least two nodes, therefore it's impossible to run migrations on a single node. Maybe consistency level could be configurable too?
While reading .cql file it's throwing following error.
Exception in thread "main" com.contrastsecurity.cassandra.migration.CassandraMigrationException: Unable to scan for CQL migrations in location: classpath:migration/cassandra
In SchemaVersionDAO.java, line 205,
" SET count = count + 1" +
"WHERE name = 'installed_rank';");
there is a missing whitespace between "1" and "WHERE". This starts to cause exceptions from cassandra 3.7 on, no idea why it was accepted before
Hi,
We’re working with Cassandra in a project,
And I’m trying to use cassandra-migration library for migrations using CQL files.
I couldn’t understand how I run the migrations from command line.
I created a pom.xml
with dependency to cassandra-migration.
And a db/migrations
folder with one CQL file.
Then I run mvn install
And java -jar \ -Dcassandra.migration.keyspace.name=audit \ target/cassandra-migration-1.0.jar migrate
But I get:
no main manifest attribute, in target/cassandra-migration-1.0.jar
Is there someone who can help me get it running?
Thanks a lot!
If Cassandra is configured with client-to-server encryption using SSL, this tool does not seem to work.
There is no "bundle" location scanner, only a FileSystemClassPathLocationScanner and JarFileClassPathLocationScanner.
Proposal create a bundle location scanner.
Update ClassPathScanner.java, method createLocationScanner:
if("bundle".equals(protocol)){ ...
Creating a patch for submission
Would it be possible to publish a new version to Maven Central?
(I need support for cassandra driver v3)
There are several months of inactivity...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.