Skip to content

Commit b1381e5

Browse files
committed
fix(template): fix unnoticed error introduced in the last merge request
Wrong migrations have been generated
1 parent af0061d commit b1381e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/migration.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Migration.prototype.sqlFileLoaderTemplate = function() {
122122
'};',
123123
'',
124124
'exports.up = function(db) {',
125-
' var filePath = path.join(__dirname, \'sqls', this.name.replace(
125+
' var filePath = path.join(__dirname, \'sqls\', \'' + this.name.replace(
126126
'.js', '') + '-up.sql\');',
127127
' return new Promise( function( resolve, reject ) {',
128128
' fs.readFile(filePath, {encoding: \'utf-8\'}, function(err,data){',
@@ -138,7 +138,7 @@ Migration.prototype.sqlFileLoaderTemplate = function() {
138138
'};',
139139
'',
140140
'exports.down = function(db) {',
141-
' var filePath = path.join(__dirname, \'sqls', this.name.replace(
141+
' var filePath = path.join(__dirname, \'sqls\', \'' + this.name.replace(
142142
'.js', '') + '-down.sql\');',
143143
' return new Promise( function( resolve, reject ) {',
144144
' fs.readFile(filePath, {encoding: \'utf-8\'}, function(err,data){',

0 commit comments

Comments
 (0)