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

Commit 186f24ee by Mick Hansen

Merge pull request #4965 from treythomas123/migration-transactions

Add transaction support to all migration queries
2 parents 332017b6 4bae4b83
Showing with 53 additions and 58 deletions
...@@ -20,13 +20,13 @@ var QueryInterface = function(sequelize) { ...@@ -20,13 +20,13 @@ var QueryInterface = function(sequelize) {
QueryInterface.prototype.createSchema = function(schema, options) { QueryInterface.prototype.createSchema = function(schema, options) {
options = options || {}; options = options || {};
var sql = this.QueryGenerator.createSchema(schema); var sql = this.QueryGenerator.createSchema(schema);
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
}; };
QueryInterface.prototype.dropSchema = function(schema, options) { QueryInterface.prototype.dropSchema = function(schema, options) {
options = options || {}; options = options || {};
var sql = this.QueryGenerator.dropSchema(schema); var sql = this.QueryGenerator.dropSchema(schema);
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
}; };
QueryInterface.prototype.dropAllSchemas = function(options) { QueryInterface.prototype.dropAllSchemas = function(options) {
...@@ -34,10 +34,10 @@ QueryInterface.prototype.dropAllSchemas = function(options) { ...@@ -34,10 +34,10 @@ QueryInterface.prototype.dropAllSchemas = function(options) {
var self = this; var self = this;
if (!this.QueryGenerator._dialect.supports.schemas) { if (!this.QueryGenerator._dialect.supports.schemas) {
return this.sequelize.drop({ logging: options.logging }); return this.sequelize.drop(options);
} else { } else {
return this.showAllSchemas(options).map(function(schemaName) { return this.showAllSchemas(options).map(function(schemaName) {
return self.dropSchema(schemaName, { logging: options.logging }); return self.dropSchema(schemaName, options);
}); });
} }
}; };
...@@ -45,11 +45,11 @@ QueryInterface.prototype.dropAllSchemas = function(options) { ...@@ -45,11 +45,11 @@ QueryInterface.prototype.dropAllSchemas = function(options) {
QueryInterface.prototype.showAllSchemas = function(options) { QueryInterface.prototype.showAllSchemas = function(options) {
var self = this; var self = this;
options = Utils._.extend({ options = _.assign({}, options, {
raw: true, raw: true,
type: this.sequelize.QueryTypes.SELECT, type: this.sequelize.QueryTypes.SELECT,
logging: false logging: false
}, options || {}); });
var showSchemasSql = self.QueryGenerator.showSchemasQuery(); var showSchemasSql = self.QueryGenerator.showSchemasQuery();
...@@ -63,9 +63,10 @@ QueryInterface.prototype.showAllSchemas = function(options) { ...@@ -63,9 +63,10 @@ QueryInterface.prototype.showAllSchemas = function(options) {
}; };
QueryInterface.prototype.databaseVersion = function(options) { QueryInterface.prototype.databaseVersion = function(options) {
return this.sequelize.query(this.QueryGenerator.versionQuery(), _.assign({ return this.sequelize.query(
type: QueryTypes.VERSION this.QueryGenerator.versionQuery(),
}, options)); _.assign({}, options, { type: QueryTypes.VERSION })
);
}; };
QueryInterface.prototype.createTable = function(tableName, attributes, options, model) { QueryInterface.prototype.createTable = function(tableName, attributes, options, model) {
...@@ -95,7 +96,8 @@ QueryInterface.prototype.createTable = function(tableName, attributes, options, ...@@ -95,7 +96,8 @@ QueryInterface.prototype.createTable = function(tableName, attributes, options,
if (attributes[keys[i]].type instanceof DataTypes.ENUM) { if (attributes[keys[i]].type instanceof DataTypes.ENUM) {
sql = self.QueryGenerator.pgListEnums(tableName, attributes[keys[i]].field || keys[i], options); sql = self.QueryGenerator.pgListEnums(tableName, attributes[keys[i]].field || keys[i], options);
promises.push(self.sequelize.query( promises.push(self.sequelize.query(
sql, { plain: true, raw: true, type: QueryTypes.SELECT, logging: options.logging, transaction: options.transaction } sql,
_.assign({}, options, { plain: true, raw: true, type: QueryTypes.SELECT })
)); ));
} }
} }
...@@ -110,7 +112,8 @@ QueryInterface.prototype.createTable = function(tableName, attributes, options, ...@@ -110,7 +112,8 @@ QueryInterface.prototype.createTable = function(tableName, attributes, options,
if (!results[enumIdx]) { if (!results[enumIdx]) {
sql = self.QueryGenerator.pgEnum(tableName, attributes[keys[i]].field || keys[i], attributes[keys[i]], options); sql = self.QueryGenerator.pgEnum(tableName, attributes[keys[i]].field || keys[i], attributes[keys[i]], options);
promises.push(self.sequelize.query( promises.push(self.sequelize.query(
sql, { raw: true, logging: options.logging, transaction: options.transaction } sql,
_.assign({}, options, { raw: true })
)); ));
} else if (!!results[enumIdx] && !!model) { } else if (!!results[enumIdx] && !!model) {
var enumVals = self.QueryGenerator.fromArray(results[enumIdx].enum_value) var enumVals = self.QueryGenerator.fromArray(results[enumIdx].enum_value)
...@@ -199,7 +202,7 @@ QueryInterface.prototype.dropTable = function(tableName, options) { ...@@ -199,7 +202,7 @@ QueryInterface.prototype.dropTable = function(tableName, options) {
if (instanceTable.rawAttributes[keys[i]].type instanceof DataTypes.ENUM) { if (instanceTable.rawAttributes[keys[i]].type instanceof DataTypes.ENUM) {
sql = self.QueryGenerator.pgEnumDrop(getTableName, keys[i]); sql = self.QueryGenerator.pgEnumDrop(getTableName, keys[i]);
options.supportsSearchPath = false; options.supportsSearchPath = false;
promises.push(self.sequelize.query(sql, { logging: options.logging, raw: true, transaction : options.transaction })); promises.push(self.sequelize.query(sql, _.assign({}, options, { raw: true })));
} }
} }
} }
...@@ -218,13 +221,13 @@ QueryInterface.prototype.dropAllTables = function(options) { ...@@ -218,13 +221,13 @@ QueryInterface.prototype.dropAllTables = function(options) {
return Promise.each(tableNames, function(tableName) { return Promise.each(tableNames, function(tableName) {
// if tableName is not in the Array of tables names then dont drop it // if tableName is not in the Array of tables names then dont drop it
if (skip.indexOf(tableName.tableName || tableName) === -1) { if (skip.indexOf(tableName.tableName || tableName) === -1) {
return self.dropTable(tableName, { cascade: true, logging: options.logging }); return self.dropTable(tableName, _.assign({}, options, { cascade: true }) );
} }
}); });
}; };
var skip = options.skip || []; var skip = options.skip || [];
return self.showAllTables({logging: options.logging}).then(function(tableNames) { return self.showAllTables(options).then(function(tableNames) {
if (self.sequelize.options.dialect === 'sqlite') { if (self.sequelize.options.dialect === 'sqlite') {
return self.sequelize.query('PRAGMA foreign_keys;', options).then(function(result) { return self.sequelize.query('PRAGMA foreign_keys;', options).then(function(result) {
var foreignKeysAreEnabled = result.foreign_keys === 1; var foreignKeysAreEnabled = result.foreign_keys === 1;
...@@ -240,7 +243,7 @@ QueryInterface.prototype.dropAllTables = function(options) { ...@@ -240,7 +243,7 @@ QueryInterface.prototype.dropAllTables = function(options) {
} }
}); });
} else { } else {
return self.getForeignKeysForTables(tableNames, {logging: options.logging}).then(function(foreignKeys) { return self.getForeignKeysForTables(tableNames, options).then(function(foreignKeys) {
var promises = []; var promises = [];
tableNames.forEach(function(tableName) { tableNames.forEach(function(tableName) {
...@@ -275,11 +278,11 @@ QueryInterface.prototype.dropAllEnums = function(options) { ...@@ -275,11 +278,11 @@ QueryInterface.prototype.dropAllEnums = function(options) {
return this.sequelize.query( return this.sequelize.query(
sql, sql,
{ plain: false, raw: true, type: QueryTypes.SELECT, logging: options.logging, transaction: options.transaction } _.assign({}, options, { plain: false, raw: true, type: QueryTypes.SELECT })
).map(function(result) { ).map(function(result) {
return self.sequelize.query( return self.sequelize.query(
self.QueryGenerator.pgEnumDrop(null, null, self.QueryGenerator.pgEscapeAndQuote(result.enum_name)), self.QueryGenerator.pgEnumDrop(null, null, self.QueryGenerator.pgEscapeAndQuote(result.enum_name)),
{logging: options.logging, raw: true} _.assign({}, options, { raw: true })
); );
}); });
}; };
...@@ -287,15 +290,15 @@ QueryInterface.prototype.dropAllEnums = function(options) { ...@@ -287,15 +290,15 @@ QueryInterface.prototype.dropAllEnums = function(options) {
QueryInterface.prototype.renameTable = function(before, after, options) { QueryInterface.prototype.renameTable = function(before, after, options) {
options = options || {}; options = options || {};
var sql = this.QueryGenerator.renameTableQuery(before, after); var sql = this.QueryGenerator.renameTableQuery(before, after);
return this.sequelize.query(sql, { logging: options.logging }); return this.sequelize.query(sql, options);
}; };
QueryInterface.prototype.showAllTables = function(options) { QueryInterface.prototype.showAllTables = function(options) {
var self = this; var self = this;
options = Utils._.extend({ options = _.assign({}, options, {
raw: true, raw: true,
type: QueryTypes.SHOWTABLES type: QueryTypes.SHOWTABLES
}, options || {}); });
var showTablesSql = self.QueryGenerator.showTablesQuery(); var showTablesSql = self.QueryGenerator.showTablesQuery();
return self.sequelize.query(showTablesSql, options).then(function(tableNames) { return self.sequelize.query(showTablesSql, options).then(function(tableNames) {
...@@ -321,7 +324,10 @@ QueryInterface.prototype.describeTable = function(tableName, options) { ...@@ -321,7 +324,10 @@ QueryInterface.prototype.describeTable = function(tableName, options) {
var sql = this.QueryGenerator.describeTableQuery(tableName, schema, schemaDelimiter); var sql = this.QueryGenerator.describeTableQuery(tableName, schema, schemaDelimiter);
return this.sequelize.query(sql, { type: QueryTypes.DESCRIBE, logging: options && options.logging }).then(function(data) { return this.sequelize.query(
sql,
_.assign({}, options, { type: QueryTypes.DESCRIBE })
).then(function(data) {
// If no data is returned from the query, then the table name may be wrong. // If no data is returned from the query, then the table name may be wrong.
// Query generators that use information_schema for retrieving table info will just return an empty result set, // Query generators that use information_schema for retrieving table info will just return an empty result set,
// it will not throw an error like built-ins do (e.g. DESCRIBE on MySql). // it will not throw an error like built-ins do (e.g. DESCRIBE on MySql).
...@@ -340,17 +346,17 @@ QueryInterface.prototype.addColumn = function(table, key, attribute, options) { ...@@ -340,17 +346,17 @@ QueryInterface.prototype.addColumn = function(table, key, attribute, options) {
options = options || {}; options = options || {};
attribute = this.sequelize.normalizeAttribute(attribute); attribute = this.sequelize.normalizeAttribute(attribute);
return this.sequelize.query(this.QueryGenerator.addColumnQuery(table, key, attribute), { logging: options.logging }); return this.sequelize.query(this.QueryGenerator.addColumnQuery(table, key, attribute), options);
}; };
QueryInterface.prototype.removeColumn = function(tableName, attributeName, options) { QueryInterface.prototype.removeColumn = function(tableName, attributeName, options) {
options = options || {}; options = options || {};
if (this.sequelize.options.dialect === 'sqlite') { if (this.sequelize.options.dialect === 'sqlite') {
// sqlite needs some special treatment as it cannot drop a column // sqlite needs some special treatment as it cannot drop a column
return SQLiteQueryInterface.removeColumn.call(this, tableName, attributeName, {logging: options.logging}); return SQLiteQueryInterface.removeColumn.call(this, tableName, attributeName, options);
} else { } else {
var sql = this.QueryGenerator.removeColumnQuery(tableName, attributeName); var sql = this.QueryGenerator.removeColumnQuery(tableName, attributeName);
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} }
}; };
...@@ -368,12 +374,12 @@ QueryInterface.prototype.changeColumn = function(tableName, attributeName, dataT ...@@ -368,12 +374,12 @@ QueryInterface.prototype.changeColumn = function(tableName, attributeName, dataT
if (this.sequelize.options.dialect === 'sqlite') { if (this.sequelize.options.dialect === 'sqlite') {
// sqlite needs some special treatment as it cannot change a column // sqlite needs some special treatment as it cannot change a column
return SQLiteQueryInterface.changeColumn.call(this, tableName, attributes, {logging: options.logging}); return SQLiteQueryInterface.changeColumn.call(this, tableName, attributes, options);
} else { } else {
var query = this.QueryGenerator.attributesToSQL(attributes) var query = this.QueryGenerator.attributesToSQL(attributes)
, sql = this.QueryGenerator.changeColumnQuery(tableName, query); , sql = this.QueryGenerator.changeColumnQuery(tableName, query);
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} }
}; };
...@@ -398,14 +404,14 @@ QueryInterface.prototype.renameColumn = function(tableName, attrNameBefore, attr ...@@ -398,14 +404,14 @@ QueryInterface.prototype.renameColumn = function(tableName, attrNameBefore, attr
if (this.sequelize.options.dialect === 'sqlite') { if (this.sequelize.options.dialect === 'sqlite') {
// sqlite needs some special treatment as it cannot rename a column // sqlite needs some special treatment as it cannot rename a column
return SQLiteQueryInterface.renameColumn.call(this, tableName, attrNameBefore, attrNameAfter, {logging: options.logging}); return SQLiteQueryInterface.renameColumn.call(this, tableName, attrNameBefore, attrNameAfter, options);
} else { } else {
var sql = this.QueryGenerator.renameColumnQuery( var sql = this.QueryGenerator.renameColumnQuery(
tableName, tableName,
attrNameBefore, attrNameBefore,
this.QueryGenerator.attributesToSQL(_options) this.QueryGenerator.attributesToSQL(_options)
); );
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} }
}.bind(this)); }.bind(this));
}; };
...@@ -427,17 +433,12 @@ QueryInterface.prototype.addIndex = function(tableName, attributes, options, raw ...@@ -427,17 +433,12 @@ QueryInterface.prototype.addIndex = function(tableName, attributes, options, raw
options = options || {}; options = options || {};
options.fields = attributes; options.fields = attributes;
var sql = this.QueryGenerator.addIndexQuery(tableName, options, rawTablename); var sql = this.QueryGenerator.addIndexQuery(tableName, options, rawTablename);
return this.sequelize.query(sql, { logging: options.logging, supportsSearchPath: false }); return this.sequelize.query(sql, _.assign({}, options, { supportsSearchPath: false }));
}; };
QueryInterface.prototype.showIndex = function(tableName, options) { QueryInterface.prototype.showIndex = function(tableName, options) {
var sql = this.QueryGenerator.showIndexesQuery(tableName, options); var sql = this.QueryGenerator.showIndexesQuery(tableName, options);
options = options || {}; return this.sequelize.query(sql, _.assign({}, options, { type: QueryTypes.SHOWINDEXES }));
return this.sequelize.query(sql, {
transaction: options.transaction,
logging: options.logging,
type: QueryTypes.SHOWINDEXES
});
}; };
QueryInterface.prototype.nameIndexes = function(indexes, rawTablename) { QueryInterface.prototype.nameIndexes = function(indexes, rawTablename) {
...@@ -453,7 +454,7 @@ QueryInterface.prototype.getForeignKeysForTables = function(tableNames, options) ...@@ -453,7 +454,7 @@ QueryInterface.prototype.getForeignKeysForTables = function(tableNames, options)
} }
return Promise.map(tableNames, function(tableName) { return Promise.map(tableNames, function(tableName) {
return self.sequelize.query(self.QueryGenerator.getForeignKeysQuery(tableName, self.sequelize.config.database), {logging: options.logging}).get(0); return self.sequelize.query(self.QueryGenerator.getForeignKeysQuery(tableName, self.sequelize.config.database), options).get(0);
}).then(function(results) { }).then(function(results) {
var result = {}; var result = {};
...@@ -474,7 +475,7 @@ QueryInterface.prototype.getForeignKeysForTables = function(tableNames, options) ...@@ -474,7 +475,7 @@ QueryInterface.prototype.getForeignKeysForTables = function(tableNames, options)
QueryInterface.prototype.removeIndex = function(tableName, indexNameOrAttributes, options) { QueryInterface.prototype.removeIndex = function(tableName, indexNameOrAttributes, options) {
options = options || {}; options = options || {};
var sql = this.QueryGenerator.removeIndexQuery(tableName, indexNameOrAttributes); var sql = this.QueryGenerator.removeIndexQuery(tableName, indexNameOrAttributes);
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
}; };
QueryInterface.prototype.insert = function(instance, tableName, values, options) { QueryInterface.prototype.insert = function(instance, tableName, values, options) {
...@@ -624,10 +625,7 @@ QueryInterface.prototype.delete = function(instance, tableName, identifier, opti ...@@ -624,10 +625,7 @@ QueryInterface.prototype.delete = function(instance, tableName, identifier, opti
} }
return Promise.each(cascades, function (cascade) { return Promise.each(cascades, function (cascade) {
return instance[cascade]({ return instance[cascade](options).then(function (instances) {
transaction: options.transaction,
logging: options.logging
}).then(function (instances) {
// Check for hasOne relationship with non-existing associate ("has zero") // Check for hasOne relationship with non-existing associate ("has zero")
if (!instances) { if (!instances) {
return Promise.resolve(); return Promise.resolve();
...@@ -636,10 +634,7 @@ QueryInterface.prototype.delete = function(instance, tableName, identifier, opti ...@@ -636,10 +634,7 @@ QueryInterface.prototype.delete = function(instance, tableName, identifier, opti
if (!Array.isArray(instances)) instances = [instances]; if (!Array.isArray(instances)) instances = [instances];
return Promise.each(instances, function (instance) { return Promise.each(instances, function (instance) {
return instance.destroy({ return instance.destroy(options);
transaction: options.transaction,
logging: options.logging
});
}); });
}); });
}).then(function () { }).then(function () {
...@@ -725,7 +720,7 @@ QueryInterface.prototype.createTrigger = function(tableName, triggerName, timing ...@@ -725,7 +720,7 @@ QueryInterface.prototype.createTrigger = function(tableName, triggerName, timing
var sql = this.QueryGenerator.createTrigger(tableName, triggerName, timingType, fireOnArray, functionName, functionParams, optionsArray); var sql = this.QueryGenerator.createTrigger(tableName, triggerName, timingType, fireOnArray, functionName, functionParams, optionsArray);
options = options || {}; options = options || {};
if (sql) { if (sql) {
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} else { } else {
return Promise.resolve(); return Promise.resolve();
} }
...@@ -736,7 +731,7 @@ QueryInterface.prototype.dropTrigger = function(tableName, triggerName, options) ...@@ -736,7 +731,7 @@ QueryInterface.prototype.dropTrigger = function(tableName, triggerName, options)
options = options || {}; options = options || {};
if (sql) { if (sql) {
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} else { } else {
return Promise.resolve(); return Promise.resolve();
} }
...@@ -747,7 +742,7 @@ QueryInterface.prototype.renameTrigger = function(tableName, oldTriggerName, new ...@@ -747,7 +742,7 @@ QueryInterface.prototype.renameTrigger = function(tableName, oldTriggerName, new
options = options || {}; options = options || {};
if (sql) { if (sql) {
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} else { } else {
return Promise.resolve(); return Promise.resolve();
} }
...@@ -758,7 +753,7 @@ QueryInterface.prototype.createFunction = function(functionName, params, returnT ...@@ -758,7 +753,7 @@ QueryInterface.prototype.createFunction = function(functionName, params, returnT
options = options || {}; options = options || {};
if (sql) { if (sql) {
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} else { } else {
return Promise.resolve(); return Promise.resolve();
} }
...@@ -769,7 +764,7 @@ QueryInterface.prototype.dropFunction = function(functionName, params, options) ...@@ -769,7 +764,7 @@ QueryInterface.prototype.dropFunction = function(functionName, params, options)
options = options || {}; options = options || {};
if (sql) { if (sql) {
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} else { } else {
return Promise.resolve(); return Promise.resolve();
} }
...@@ -780,7 +775,7 @@ QueryInterface.prototype.renameFunction = function(oldFunctionName, params, newF ...@@ -780,7 +775,7 @@ QueryInterface.prototype.renameFunction = function(oldFunctionName, params, newF
options = options || {}; options = options || {};
if (sql) { if (sql) {
return this.sequelize.query(sql, {logging: options.logging}); return this.sequelize.query(sql, options);
} else { } else {
return Promise.resolve(); return Promise.resolve();
} }
...@@ -826,7 +821,7 @@ QueryInterface.prototype.setAutocommit = function(transaction, value, options) { ...@@ -826,7 +821,7 @@ QueryInterface.prototype.setAutocommit = function(transaction, value, options) {
return Promise.resolve(); return Promise.resolve();
} }
options = _.assign({}, options || {}, { options = _.assign({}, options, {
transaction: transaction.parent || transaction transaction: transaction.parent || transaction
}); });
...@@ -848,7 +843,7 @@ QueryInterface.prototype.setIsolationLevel = function(transaction, value, option ...@@ -848,7 +843,7 @@ QueryInterface.prototype.setIsolationLevel = function(transaction, value, option
return Promise.resolve(); return Promise.resolve();
} }
options = _.assign({}, options || {}, { options = _.assign({}, options, {
transaction: transaction.parent || transaction transaction: transaction.parent || transaction
}); });
...@@ -866,7 +861,7 @@ QueryInterface.prototype.startTransaction = function(transaction, options) { ...@@ -866,7 +861,7 @@ QueryInterface.prototype.startTransaction = function(transaction, options) {
throw new Error('Unable to start a transaction without transaction object!'); throw new Error('Unable to start a transaction without transaction object!');
} }
options = _.assign({}, options || {}, { options = _.assign({}, options, {
transaction: transaction.parent || transaction transaction: transaction.parent || transaction
}); });
...@@ -876,9 +871,9 @@ QueryInterface.prototype.startTransaction = function(transaction, options) { ...@@ -876,9 +871,9 @@ QueryInterface.prototype.startTransaction = function(transaction, options) {
}; };
QueryInterface.prototype.deferConstraints = function (transaction, options) { QueryInterface.prototype.deferConstraints = function (transaction, options) {
options = Utils._.extend({ options = _.assign({}, options, {
transaction: transaction.parent || transaction transaction: transaction.parent || transaction
}, options || {}); });
var sql = this.QueryGenerator.deferConstraintsQuery(options); var sql = this.QueryGenerator.deferConstraintsQuery(options);
...@@ -898,7 +893,7 @@ QueryInterface.prototype.commitTransaction = function(transaction, options) { ...@@ -898,7 +893,7 @@ QueryInterface.prototype.commitTransaction = function(transaction, options) {
return Promise.resolve(); return Promise.resolve();
} }
options = _.assign({}, options || {}, { options = _.assign({}, options, {
transaction: transaction.parent || transaction, transaction: transaction.parent || transaction,
supportsSearchPath: false supportsSearchPath: false
}); });
...@@ -913,7 +908,7 @@ QueryInterface.prototype.rollbackTransaction = function(transaction, options) { ...@@ -913,7 +908,7 @@ QueryInterface.prototype.rollbackTransaction = function(transaction, options) {
throw new Error('Unable to rollback a transaction without transaction object!'); throw new Error('Unable to rollback a transaction without transaction object!');
} }
options = _.assign({}, options || {}, { options = _.assign({}, options, {
transaction: transaction.parent || transaction, transaction: transaction.parent || transaction,
supportsSearchPath: false supportsSearchPath: false
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!