Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add format function #196

Merged
merged 13 commits into from
Mar 29, 2020
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,14 @@ It is possible to configure *umzug* instance by passing an object to the constru
// read raw sql etc.
// See https://github.com/sequelize/umzug/tree/master/test/fixtures
// for examples.
customResolver: function (sqlPath) {
return { up: () => sequelize.query(require('fs').readFileSync(sqlPath, 'utf8')) }
customResolver: function (sqlPath) {
return { up: () => sequelize.query(require('fs').readFileSync(sqlPath, 'utf8')) };
}

// A function that receives the file name of the migration and returns the name of the
// migration. This can be used to remove file extensions for example.
nameFormatter: function (fileName) {
jaulz marked this conversation as resolved.
Show resolved Hide resolved
return path.parse(fileName).name;
}
}
}
Expand Down