|
| 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