@haoc-labs/mygreat

1.0.2 • Public • Published

mygreat

Agnostic migration tool

Usage

Structure:

- /
  - migrations/
    - 20171001190100.js
    - 20171001190200.js
  - remote-synced-sample/
  - .mygreat.js

Migration file example:

'use strict'

module.exports = {
    up: async (db) => { },
    down: async (db) => { }
}

.mygreat.js configuration file sample:

'use strict'

const Database = require('some-database')
const directory = require('@haoc-labs/mygreat-directory')

module.exports = (env) => ({
    local: directory('./migrations'),
    remote: directory('./remote-synced-sample'),
    setup: () => new Database('localhost')
})

Readme

Keywords

none

Package Sidebar

Install

npm i @haoc-labs/mygreat

Weekly Downloads

32

Version

1.0.2

License

MIT

Last publish

Collaborators

  • haocbot
  • rwillians