Skip to content

Commit 03145a9

Browse files
committed
fix wrong reference to migration folder
fixes #720 Signed-off-by: Tobias Gurtzick <[email protected]>
1 parent af639d4 commit 03145a9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

connect.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ exports.connect = function (config, PassedClass) {
2525
return;
2626
}
2727

28+
var dirPath = path.resolve(
29+
internals.argv['migrations-dir'] || 'migrations'
30+
);
2831
if (internals.migrationMode) {
29-
var dirPath = path.resolve(
30-
internals.argv['migrations-dir'] || 'migrations'
31-
);
3232
if (internals.migrationMode !== 'all') {
3333
var switched = false;
3434
var newConf;
@@ -56,7 +56,7 @@ exports.connect = function (config, PassedClass) {
5656
null,
5757
new PassedClass(
5858
db,
59-
internals.argv['migrations-dir'],
59+
dirPath,
6060
internals.mode !== 'static',
6161
internals,
6262
prefix
@@ -69,7 +69,7 @@ exports.connect = function (config, PassedClass) {
6969
null,
7070
new PassedClass(
7171
db,
72-
internals.argv['migrations-dir'],
72+
dirPath,
7373
internals.mode !== 'static',
7474
internals,
7575
prefix
@@ -112,7 +112,7 @@ exports.connect = function (config, PassedClass) {
112112
null,
113113
new PassedClass(
114114
db,
115-
internals.argv['migrations-dir'],
115+
dirPath,
116116
internals.mode !== 'static',
117117
internals,
118118
prefix

0 commit comments

Comments
 (0)