不要怂,就是干,撸起袖子干!

Commit 6f65e6de by terraflubb

Include a done() in the migration skeleton

Because I always forget to add one to 'down' and then my migrations don't undo.

Also upgraded a ==.
1 parent 37244f18
Showing with 3 additions and 1 deletions
......@@ -148,16 +148,18 @@ if(program.migrate) {
var migrationName = [
moment().format('YYYYMMDDHHmmss'),
(typeof program.createMigration == 'string') ? program.createMigration : 'unnamed-migration'
(typeof program.createMigration === 'string') ? program.createMigration : 'unnamed-migration'
].join('-') + '.js'
var migrationContent = [
"module.exports = {",
" up: function(migration, DataTypes, done) {",
" // add altering commands here, calling 'done' when finished",
" done()",
" },",
" down: function(migration, DataTypes, done) {",
" // add reverting commands here, calling 'done' when finished",
" done()",
" }",
"}"
].join('\n')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!