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

Commit 81cdd266 by jtschoonhoven

fixed failing test on postgres

1 parent 5ab88d03
Showing with 9 additions and 6 deletions
......@@ -35,6 +35,7 @@ module.exports = (function() {
return new Utils.CustomEventEmitter(function(emitter) {
if(options.method === 'down') {
self.getCompletedMigrations(function(err, migrations){
migrations.reverse()
self.processMigrations(err, migrations, options, emitter);
});
} else {
......@@ -365,13 +366,15 @@ module.exports = (function() {
var deleteUndoneMigration = Migrator.prototype.deleteUndoneMigration = function(from, to, callback) {
var self = this;
self.findOrCreateSequelizeMetaDAO().success(function(SequelizeMeta) {
SequelizeMeta
.find({ where: { from: from.migrationId.toString(), to: to.migrationId.toString() } })
.success(function(meta) {
meta.destroy().success(callback);
});
SequelizeMeta.find({ where: { from: from.migrationId.toString(), to: to.migrationId.toString() } })
.success(function(meta) {
if(meta){
meta.destroy().success(callback)
} else {
callback()
}
});
});
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!