Library to create and run migration scripts for Mongo DBs
Last updated 2 years ago by watson28 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @keystone-labs/mongo-migrate 
SYNC missed versions from official npm registry.


NPM package for the creation and execution of mongoDB migrations. Provide commands for the creation and execution of migrations scripts.


Environment variables.


Database connection where migrations will be executed. you might opt to use a .env file to set this variable.

Migrations folder.

// package.json
  mongo-migrate: { migrationsPath: './path/where/migration/will/save' }

A folder path where migrations will be saved. If this is not specified it will create a migrations folder in the root path of the project.


yarn migrate create <<migration-name>>

Create a new migration file in the folder specified by SERVER_MIGRATION_PATH. it requires a <<migration-name>>.

yarn run

Execute pending migrations (migrations that are not been run in the database).

yarn rerurn

Execute the last migration that was run.

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (3)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |