Skip to content

Commit 38305d4

Browse files
committed
fix(api): fix scoping
The api was missing the matching internal, which resulted in a missing prefix when executing scope migrations. fixes #409
1 parent d74f377 commit 38305d4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

api.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ dbmigrate.prototype = {
177177
if (typeof(opts) === 'string') {
178178

179179
this.internals.migrationMode = opts;
180+
this.internals.matching = opts;
180181
}
181182
else if (typeof(opts) === 'function') {
182183

@@ -210,6 +211,7 @@ dbmigrate.prototype = {
210211
if (typeof(opts) === 'string') {
211212

212213
this.internals.migrationMode = opts;
214+
this.internals.matching = opts;
213215
}
214216
else if (typeof(opts) === 'function') {
215217

@@ -231,6 +233,7 @@ dbmigrate.prototype = {
231233
if (typeof(scope) === 'string') {
232234

233235
this.internals.migrationMode = scope;
236+
this.internals.matching = scope;
234237
}
235238
else if(typeof(scope) === 'function') {
236239

@@ -263,6 +266,7 @@ dbmigrate.prototype = {
263266
} else if (scope) {
264267

265268
this.internals.migrationMode = scope;
269+
this.internals.matching = scope;
266270
}
267271

268272
this.internals.argv._.push(migrationName);
@@ -335,6 +339,7 @@ dbmigrate.prototype = {
335339
if (scope) {
336340

337341
this.internals.migrationMode = scope;
342+
this.internals.matching = scope;
338343
}
339344

340345
this.internals.mode = mode || 'vc';
@@ -357,10 +362,12 @@ dbmigrate.prototype = {
357362
if (scope) {
358363

359364
this.internals.migrationMode = scope;
365+
this.internals.matching = scope;
360366
}
361367
} else if (typeof(specification) === 'string') {
362368

363369
this.internals.migrationMode = scope;
370+
this.internals.matching = scope;
364371
}
365372
}
366373

@@ -383,10 +390,12 @@ dbmigrate.prototype = {
383390
if (scope) {
384391

385392
this.internals.migrationMode = scope;
393+
this.internals.matching = scope;
386394
}
387395
} else if (typeof(specification) === 'string') {
388396

389397
this.internals.migrationMode = scope;
398+
this.internals.matching = scope;
390399
}
391400
}
392401

0 commit comments

Comments
 (0)