Comparing version 0.5.6 to 0.5.7
@@ -74,5 +74,12 @@ 'use strict'; | ||
Migrator.prototype._createAdapter = function(adapterPath, params) { | ||
Migrator.prototype._createAdapter = function(adapter, params) { | ||
if (utils.isFunction(adapter)) { | ||
try { | ||
return new adapter(params); | ||
} catch (err) { | ||
throw new Error('Error constructing adapter:' + err.message); | ||
} | ||
} | ||
// try load adapter from migrator-related path first then from cwd-related | ||
var paths = [adapterPath, path.join(process.cwd(), adapterPath)], | ||
var paths = [adapter, path.join(process.cwd(), adapter)], | ||
Adapter, | ||
@@ -79,0 +86,0 @@ errors = []; |
{ | ||
"name": "east", | ||
"description": "node.js database migration tool for mongodb, sqlite, postgres, mysql, couchbase", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"author": "Oleg Korobenko <oleg.korobenko@gmail.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39745
954