Cassandra Migration ToolBack Open source
Cassandra migration tool is a lightweight tool used to execute schema and data migration on Cassandra database. Schema versioning state is saved in schema_version table which stores name and description of migration along with type and timestamp.
There are two types of migrations:
- SCHEMA migrations, which alter database schema (add or remove column, change type of column, add table, etc)
- DATA migrations, which alter data (update, read from one table to another, calculate new fields based on existing data, etc).
Why we did it
The idea behind this project was born while working on a project with live data. Since the development required changes to the data model we had to figure out a way we can update the database schema while keeping the data. We ended up with a lightweight tool that versions database and enables us to change schema and transform data when and how we want (as a part of a build and deploy cycle or application itself). Since these changes are part of the codebase we could also test them before executing on a live cluster.