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

Commit d3ef9e7d by Mick Hansen

fix(query-interface): check addColumn signature is fulfilled, closes #4077

1 parent 186842ee
Showing with 4 additions and 0 deletions
......@@ -358,6 +358,10 @@ QueryInterface.prototype.describeTable = function(tableName, options) {
};
QueryInterface.prototype.addColumn = function(table, key, attribute, options) {
if (!table || !key || !attribute) {
throw new Error('addColumn takes atleast 3 arguments (table, attribute name, attribute definition)');
}
options = options || {};
attribute = this.sequelize.normalizeAttribute(attribute);
return this.sequelize.query(this.QueryGenerator.addColumnQuery(table, key, attribute), { logging: options.logging });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!