UNPKG

649 BMarkdownView Raw
1# mygreat
2
3Agnostic migration tool
4
5
6## Usage
7
8**Structure:**
9
10```txt
11- /
12 - migrations/
13 - 20171001190100.js
14 - 20171001190200.js
15 - remote-synced-sample/
16 - .mygreat.js
17```
18
19**Migration file example:**
20
21```js
22'use strict'
23
24module.exports = {
25 up: async (db) => { },
26 down: async (db) => { }
27}
28```
29
30
31**`.mygreat.js` configuration file sample:**
32
33```js
34'use strict'
35
36const Database = require('some-database')
37const directory = require('@haoc-labs/mygreat-directory')
38
39module.exports = (env) => ({
40 local: directory('./migrations'),
41 remote: directory('./remote-synced-sample'),
42 setup: () => new Database('localhost')
43})
44```