CQL Migration is a simple command-line migration tool for Apache Cassandra, using CQL (Cassandra Query Language) files. Current stable version is 1.0.13. It provides basic up and down migration commands with configurable counts. The tool reads migration files from a specified directory, parses up/down sections separated by '---' markers, and applies them to a Cassandra cluster. It differs from more complex migration frameworks by its minimal configuration and dependency on a single npm package. Requires Node.js and Cassandra driver.
npm install cql-migrationNo compatibility data collected yet for this library.
Global installation of cql-migration, creation of config file and a sample migration, then running up and down commands.
Rename config file to '.migration.js' or create symlink.
Ensure migration files follow the pattern '[VERSION]_[NAME].cql' or '[VERSION]_[NAME].sql'.
Always specify count explicitly when running down to avoid accidental rollbacks.
Create file '.migration.js' in the current directory with the required configuration.
Check that .migration.js exports a valid object with required fields: dir, url, keyspace, username, password, dataCenter.
Start Cassandra, verify connection URL (default 127.0.0.1:9042), and check network/firewall.
Create keyspace in Cassandra first, e.g., CREATE KEYSPACE mykeyspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};No dependency data recorded yet.