coffee-db-migrate
Abstract migration framework for node (in coffeescript) which store migration steps in db.
Last updated 6 years ago by daniel.gawron .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install coffee-db-migrate 
SYNC missed versions from official npm registry.

##Migrate

Abstract migration framework for node (in coffeescript) which store migration steps in db.

###Origin

This project is based on cofee-migrate.

The main difference: it stores migrated files titles in db

###Usage

Usage: migrate [options] [command]

Options:

   -c, --chdir <path>   change the working directory, --db store migration steps in db

Commands:

   down             migrate down
   up               migrate up (the default command)
   create [title]   create a new migration file with optional [title]

For use db to store migration steps, dbMigration.coffee file should be created in migrations folder. Following methods dbMigration file must have:

exports.lockMigrationProcess = ( next ) -> #check if migration is running otherwise lock next()

exports.releaseMigration = ( next ) -> #remove lock next()

exports.getStoredMigrations = ( next )-> #get all stored migrations next()

exports.saveState = ( title , status , next ) -> #save migration next()

exports.removeMigration = ( title , next ) -> #remove when error or down next()

Current Tags

  • 0.1.2                                ...           latest (6 years ago)

3 Versions

  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |