Add checkFieldAndIndex (#87)

* Add checkFieldAndIndex
This commit is contained in:
Janny 2017-03-03 20:22:08 -05:00 committed by GitHub
parent bba29f88f2
commit 050cfa5249
1 changed files with 5 additions and 1 deletions

View File

@ -216,6 +216,10 @@ SQLConnector.prototype.alterTable = function(model, fields, indexes, cb) {
throw new Error(g.f('{{alterTable()}} must be implemented by the connector'));
};
SQLConnector.prototype.checkFieldAndIndex = function(fields, indexes) {
return true;
};
/**
* Get the status of a table
* @param {String} model The model name
@ -233,7 +237,7 @@ SQLConnector.prototype.getTableStatus = function(model, cb) {
if (err) return cb(err);
indexes = data;
if (fields && indexes)
if (self.checkFieldAndIndex(fields, indexes))
return cb(null, fields, indexes);
});
});