migratedb

Migrates databases.

npm install migratedb
4 downloads in the last month

MigrateDb Build Status

A simple utility to run simple database migrations.

Motivation

Changes to production database systems come in two flavors:

  • Constant changes are performed by the application during its normal course of operation which is mostly stuff like adding and deleting rows.
  • Some special changes are performed outside of the normal operation of the application either at deployment time, startup time, manually, or via something more complicated like this.

MigrateDb exists to support the second use case. It will track migrations that have been run against a particular RDBMs and apply the missing ones but it won't try to abstract your RDBMS's syntax away from you and doesn't require that all migrations are declared in a specific order.

Usage

There are two ways to use MigrateDb: via the CLI tool or by embedding it into your application.

CLI

npm install -g MigrateDb
cd some_directory_with_migrations
MigrateDb list
MigrateDb up
npm loves you