A Node.js migration tool for Elasticsearch, similar to traditional SQL schema migrations. Current version 1.0.3. It provides a CLI (`elastic-migrate`) for creating, applying, and rolling back migrations, as well as seeding data. Requires Node.js >=14.17.0, ^16.0.0, or >=18.0.0 and Elasticsearch 8.7. Compared to other ES migration tools, it offers a Knex-like interface with batch rollbacks and seed support, but may lack extensive community adoption.
npm install elasticsearch-migrationsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows CommonJS require, config object with environment variable, instantiation, and basic migration creation/application.
Ensure Elasticsearch cluster is running version 8.7 or upgrade the package if available.
Upgrade Node.js to ^14.17.0 || ^16.0.0 || >=18.0.0.
Use `elastic-migrate migrate:make <name>` from the command line after global install.
Create an instance: `const Em = new ElasticMigrations(config)` then use `Em.migrate`.
Create a declaration file: `declare module 'elasticsearch-migrations';` or use `// @ts-ignore`.
Run `npm install elasticsearch-migrations --save` or `npm install -g elasticsearch-migrations`.
Use `const ElasticMigrations = require('elasticsearch-migrations');`Instantiate: `const em = new ElasticMigrations(config);` then use `em.migrate.make(...)`.
Create a 'migrations' folder in project root or set `migrationsDir` in config object.
No dependency data recorded yet.