-
Notifications
You must be signed in to change notification settings - Fork 21
Home
cassandra-migration
is a simple and lightweight Apache Cassandra and DataStax Enterprise database schema migration tool. It is designed to work similar to Flyway with support for both plain CQL and Java-based migrations, using DataStax's Cassandra Java driver in its implementation.
The tool does not roll back the database upon migration failure. You're expected to manually restore backup.
Why not create an extension to an existing popular database migration project (i.e. Flyway)?
Popular database migration tools (e.g. Flyway, Liquibase) are tailored for relational databases with JDBC. This project exists due to the need for Cassandra-specific tooling:
- CQL != SQL,
- Cassandra is distributed and does not have ACID transactions,
- Cassandra do not have native JDBC driver(s),
- etc.
Why not extend the existing Cassandra Migration project?
The project this tool is based on (Contrast-Security-OSS / cassandra-migration) does not seem to be actively maintained any more. Several important PRs have been left open for months and there was an immediate need to support Cassandra driver v3.x.
Why Kotlin?
There are various reasons why Kotlin was chosen, but the three main reasons are:
- code brevity and reduced noise,
- stronger
null
checks (enforced at the compiler level), and - better Java collection support (e.g. additional functional features)
Should you find this tool does not fit your needs, there exists several other open-source libraries, each with its unique approaches to Cassandra schema migration. By no means this is an exhaustive list, but it might help steer you to the right direction: