A Node.js library for forward-only database migrations in Apache Cassandra. Version 0.2.8 is current. Uses ES6 modules; requires Node.js 12+. Provides deterministic, ordered CQL and JavaScript migrations with automatic state tracking in a dedicated table. Designed to embrace Cassandra's no-rollback model. Supports multiple Cassandra clients and includes validation and inspection utilities. Minimal, explicit API.
npm install cassandra-shiftNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes two Cassandra clients, creates a migration instance with configuration, and applies pending migrations.
Switch to ES module import syntax (import). Use dynamic import() if needed from CommonJS, but prefer ESM.
Explicitly create keyspace before migrations if needed.
Name files with consistent zero-padded numbers, e.g., '001_init.cql', '002_add_column.js'.
Use `export default async function(clients) { ... }`.Always provide an array with one or more Client instances.
Change `const CassandraShift = require('cassandra-shift')` to `import CassandraShift from 'cassandra-shift'` and ensure your project is set to use ES modules.Add `export default async function(clients) { ... }` to the migration file.Ensure clients is an array, e.g., `[client1, client2]`.