Skip to content

Commit

Permalink
fix(api): fix scoping
Browse files Browse the repository at this point in the history
The api was missing the matching internal, which resulted in a missing prefix
when executing scope migrations.

fixes #409
  • Loading branch information
wzrdtales committed Sep 5, 2016
1 parent 9df704e commit d6cf5d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ dbmigrate.prototype = {
if (typeof(opts) === 'string') {

this.internals.migrationMode = opts;
this.internals.matching = opts;
}
else if (typeof(opts) === 'function') {

Expand Down Expand Up @@ -250,6 +251,7 @@ dbmigrate.prototype = {
if (typeof(opts) === 'string') {

this.internals.migrationMode = opts;
this.internals.matching = opts;
}
else if (typeof(opts) === 'function') {

Expand All @@ -271,6 +273,7 @@ dbmigrate.prototype = {
if (typeof(scope) === 'string') {

this.internals.migrationMode = scope;
this.internals.matching = scope;
}
else if(typeof(scope) === 'function') {

Expand Down Expand Up @@ -303,6 +306,7 @@ dbmigrate.prototype = {
} else if (scope) {

this.internals.migrationMode = scope;
this.internals.matching = scope;
}

this.internals.argv._.push(migrationName);
Expand Down Expand Up @@ -375,6 +379,7 @@ dbmigrate.prototype = {
if (scope) {

this.internals.migrationMode = scope;
this.internals.matching = scope;
}

this.internals.mode = mode || 'vc';
Expand All @@ -397,10 +402,12 @@ dbmigrate.prototype = {
if (scope) {

this.internals.migrationMode = scope;
this.internals.matching = scope;
}
} else if (typeof(specification) === 'string') {

this.internals.migrationMode = scope;
this.internals.matching = scope;
}
}

Expand All @@ -423,10 +430,12 @@ dbmigrate.prototype = {
if (scope) {

this.internals.migrationMode = scope;
this.internals.matching = scope;
}
} else if (typeof(specification) === 'string') {

this.internals.migrationMode = scope;
this.internals.matching = scope;
}
}

Expand Down

0 comments on commit d6cf5d4

Please sign in to comment.