Modern migration toolkit for knex.js (v1.7.4) that provides a command-line interface and programmatic API for managing database migrations with knex. It offers features such as migrating to any version, running individual migrations, rolling back recent migrations, redo for quick testing, and transaction-based execution. It is fully compatible with knex.js's migration CLI and supports environment-specific configuration via knexfile. The package is actively maintained with peer dependency on knex, requiring Node >= 8.
npm install knex-migrateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows programmatic usage of knex-migrate with knex setup and migration commands.
Install knex: npm install knex
Use --raw with caution or ensure migration logic is idempotent.
Use import knexMigrate from 'knex-migrate'
Specify version explicitly to avoid unintended migrations.
Use knexfile configuration for path settings.
npm install knex
Use: import knexMigrate from 'knex-migrate'
Set correct knexfile or provide --migrations path
Use: const knex = require('knex');