-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up config template in favor of Github issues
- Loading branch information
Showing
2 changed files
with
102 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,81 @@ | ||
module.exports = exports = { | ||
// The folder to store migration scripts in. | ||
/** | ||
* @name migrationsDirectory | ||
* | ||
* The folder to store migration scripts in, | ||
* relative to your configuration file. | ||
*/ | ||
// migrationsDirectory: './migrations', | ||
|
||
// Persists the current migration state. The `state` argument | ||
// will always be an object. Store it as JSON to redis, disk, etc. | ||
// OPTIONAL: If undefined, Exodus falls back to exodus.state.json | ||
/** | ||
* @name context | ||
* | ||
* Invoked at the beginning of a run, this method can return | ||
* an object with any details you want passed through to all | ||
* migrations, such as database connections, loggers, etc. | ||
* | ||
* @return {object} | ||
*/ | ||
// context: async () => { return {} }, | ||
|
||
/** | ||
* @name storeState | ||
* | ||
* Called to persist current migration state. Use this to store | ||
* the `state` argument in Redis, to disk, your database etc. | ||
* If undefined, Exodus falls back to exodus.state.json | ||
* | ||
* @param state The state object to be stored. | ||
* @param context The object you returned in `context` | ||
*/ | ||
// storeState: async (state, context) => {}, | ||
|
||
// This method is responsible for fetching the | ||
// current migration state, persisted by `storeState`. | ||
// OPTIONAL: If undefined, Exodus falls back to exodus.state.json | ||
/** | ||
* @name fetchState | ||
* | ||
* This method is responsible for fetching the current | ||
* migration state, persisted by `storeState`. | ||
* If undefined, Exodus falls back to exodus.state.json | ||
* | ||
* @param context The object you returned in `context` | ||
* @return {object} | ||
*/ | ||
// fetchState: async (context) => {}, | ||
|
||
// // OPTIONAL. Invoked at the beginning of a run, this method | ||
// // should return an object with any details you want passed | ||
// // through to all migrations. This can be database connections, | ||
// // logging interfaces, etc. | ||
// context: async () => { | ||
// return {} | ||
// }, | ||
|
||
// // OPTIONAL. Provide a function that returns a string to use | ||
// // as the source for a new migration file. | ||
// migrationTemplate: async () => { | ||
// return require('fs').readFileSync('path/to/template.js', 'utf8',) | ||
// }, | ||
|
||
// // OPTIONAL. Callback executed right before all | ||
// // queued migrations are executed. | ||
/** | ||
* @name beforeAll | ||
* | ||
* Executed right before any of the queued migrations are run. | ||
* | ||
* @param {migrationJob[]} | ||
*/ | ||
// beforeAll: async (pendingMigrations) => {}, | ||
|
||
// // OPTIONAL. Callback executed before each migration. | ||
/** | ||
* @name beforeEach | ||
* | ||
* Executed before each migration. | ||
* | ||
* @param {migrationJob} | ||
*/ | ||
// beforeEach: async (migrationJob) => {}, | ||
|
||
// // OPTIONAL. Callback executed after each migration. | ||
/** | ||
* @name afterEach | ||
* | ||
* Executed after each migration. | ||
* | ||
* @param {migrationJob} | ||
*/ | ||
// afterEach: async (migrationJob) => {}, | ||
|
||
// // OPTIONAL. Callback executed right after all | ||
// // queued migrations are executed. | ||
/** | ||
* @name afterAll | ||
* | ||
* Executed after the final pending migration was run. | ||
* | ||
* @param {migrationJob[]} | ||
*/ | ||
// afterAll: async (pendingMigrations) => {}, | ||
|
||
} |