allow schema or owner

This commit is contained in:
Raymond Feng 2018-07-16 14:40:20 -07:00
parent 41d7c656c6
commit 5ab9c9c76e
1 changed files with 4 additions and 4 deletions

View File

@ -1877,7 +1877,7 @@ SQLConnector.prototype.getArgs = function(table, options, cb) {
SQLConnector.prototype.discoverModelProperties = function(table, options, cb) {
var self = this;
var args = self.getArgs(table, options, cb);
var schema = args.schema;
var schema = args.schema || args.owner;
table = args.table;
options = args.options;
@ -1927,7 +1927,7 @@ SQLConnector.prototype.buildQueryPrimaryKeys = function(schema, table) {
SQLConnector.prototype.discoverPrimaryKeys = function(table, options, cb) {
var self = this;
var args = self.getArgs(table, options, cb);
var schema = args.schema;
var schema = args.schema || args.owner;
if (typeof(self.getDefaultSchema) === 'function' && !schema) {
schema = self.getDefaultSchema();
@ -1961,7 +1961,7 @@ SQLConnector.prototype.buildQueryForeignKeys = function(schema, table) {
SQLConnector.prototype.discoverForeignKeys = function(table, options, cb) {
var self = this;
var args = self.getArgs(table, options, cb);
var schema = args.schema;
var schema = args.schema || args.owner;
if (typeof(self.getDefaultSchema) === 'function' && !schema) {
schema = self.getDefaultSchema();
@ -1998,7 +1998,7 @@ SQLConnector.prototype.buildQueryExportedForeignKeys = function(schema, table) {
SQLConnector.prototype.discoverExportedForeignKeys = function(table, options, cb) {
var self = this;
var args = self.getArgs(table, options, cb);
var schema = args.schema;
var schema = args.schema || args.owner;
if (typeof(self.getDefaultSchema) === 'function' && !schema) {
schema = self.getDefaultSchema();