coffee-db-migrate

0.1.2 • Public • Published

##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()

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    1
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i coffee-db-migrate

Weekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • daniel.gawron