diff --git a/lib/migration.js b/lib/migration.js index 5c10a3f..9bd05a5 100644 --- a/lib/migration.js +++ b/lib/migration.js @@ -116,6 +116,12 @@ function mixinMigration(MySQL, mysql) { }; MySQL.prototype.alterTable = function(model, actualFields, actualIndexes, actualFks, done, checkOnly) { + //if this is using an old signature, then grab the correct callback and check boolean + if ('function' == typeof actualFks && typeof done !== 'function') { + checkOnly = done || false; + done = actualFks; + } + var self = this; var m = this.getModelDefinition(model); var propNames = Object.keys(m.properties).filter(function(name) {