fix: Fixed sequelize-cli db:migration cannot stop when occur error

Up and Down method must return a Promise.

breaking changes: docker-hackmd cannot initialize, because db:migration will fail
This commit is contained in:
BoHong Li
2017-03-24 11:24:44 +08:00
parent cdd8a72d04
commit 66fc817ad4
5 changed files with 51 additions and 41 deletions

View File

@@ -1,10 +1,10 @@
'use strict'
module.exports = {
up: function (queryInterface, Sequelize) {
queryInterface.addColumn('Notes', 'deletedAt', Sequelize.DATE)
return queryInterface.addColumn('Notes', 'deletedAt', Sequelize.DATE)
},
down: function (queryInterface, Sequelize) {
queryInterface.removeColumn('Notes', 'deletedAt')
return queryInterface.removeColumn('Notes', 'deletedAt')
}
}