Skip to content

Commit 9027b82

Browse files
committed
config.js
1 parent 6a85fbf commit 9027b82

1 file changed

Lines changed: 81 additions & 0 deletions

File tree

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
module.exports = exports = {
2+
/**
3+
* @name migrationsDirectory
4+
*
5+
* The folder to store migration scripts in,
6+
* relative to your configuration file.
7+
*/
8+
// migrationsDirectory: './migrations',
9+
10+
/**
11+
* @name context
12+
*
13+
* Invoked at the beginning of a run, this method can return
14+
* an object with any details you want passed through to all
15+
* migrations, such as database connections, loggers, etc.
16+
*
17+
* @return {object}
18+
*/
19+
// context: async () => { return {} },
20+
21+
/**
22+
* @name storeState
23+
*
24+
* Called to persist current migration state. Use this to store
25+
* the `state` argument in Redis, to disk, your database etc.
26+
* If undefined, Exodus falls back to exodus.state.json
27+
*
28+
* @param state The state object to be stored.
29+
* @param context The object you returned in `context`
30+
*/
31+
// storeState: async (state, context) => {},
32+
33+
/**
34+
* @name fetchState
35+
*
36+
* This method is responsible for fetching the current
37+
* migration state, persisted by `storeState`.
38+
* If undefined, Exodus falls back to exodus.state.json
39+
*
40+
* @param context The object you returned in `context`
41+
* @return {object}
42+
*/
43+
// fetchState: async (context) => {},
44+
45+
/**
46+
* @name beforeAll
47+
*
48+
* Executed right before any of the queued migrations are run.
49+
*
50+
* @param {migrationJob[]}
51+
*/
52+
// beforeAll: async (pendingMigrations) => {},
53+
54+
/**
55+
* @name beforeEach
56+
*
57+
* Executed before each migration.
58+
*
59+
* @param {migrationJob}
60+
*/
61+
// beforeEach: async (migrationJob) => {},
62+
63+
/**
64+
* @name afterEach
65+
*
66+
* Executed after each migration.
67+
*
68+
* @param {migrationJob}
69+
*/
70+
// afterEach: async (migrationJob) => {},
71+
72+
/**
73+
* @name afterAll
74+
*
75+
* Executed after the final pending migration was run.
76+
*
77+
* @param {migrationJob[]}
78+
*/
79+
// afterAll: async (pendingMigrations) => {},
80+
81+
}

0 commit comments

Comments
 (0)