More information about alter in isActual

This commit is contained in:
Anatoliy Chakkaev 2012-08-20 11:01:08 +04:00
parent cc40d15082
commit 3faaa56450
1 changed files with 3 additions and 2 deletions

View File

@ -459,10 +459,11 @@ MySQL.prototype.alterTable = function (model, actualFields, actualIndexes, done,
});
if (sql.length) {
var query = 'ALTER TABLE `' + model + '` ' + sql.join(',\n');
if (checkOnly) {
done(null, true);
done(null, true, {statements: sql, query: query});
} else {
this.query('ALTER TABLE `' + model + '` ' + sql.join(',\n'), done);
this.query(query, done);
}
} else {
done();