_.each([
'createTable', 'table', 'alterTable', 'hasTable', 'hasColumn',
'dropTable', 'renameTable', 'dropTableIfExists', 'raw'
], function(method) {
SchemaBuilder.prototype[method] = function() {
if (method === 'table') method = 'alterTable';
this._sequence.push({
method: method,
args: _.toArray(arguments)
});
return this;
};
});
Constructor for the builder instance, typically called from
knex.builder, accepting the currentknexinstance, and pulling out theclientandgrammarfrom the current knex instance.