Skip to content

Commit 837fcc3

Browse files
committed
putting the config to ignoreOnInit to the options in api
instead of loading the DBM framework on every run
1 parent 49d8664 commit 837fcc3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

api.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ function dbmigrate(isModule, options, callback) {
6464
internals.dbm = dbm;
6565
global.dbm = dbm; //deprecated
6666
internals.migrationOptions = {
67-
dbmigrate: internals.dbm
67+
dbmigrate: internals.dbm,
68+
ignoreOnInit: internals['argv']['ignore-on-init']
6869
};
6970
internals.seederOptions = {
7071
dbmigrate: internals.dbm

lib/migration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Migration.prototype.sqlFileLoaderIgnoreOnInitTemplate = function() {
171171
" */",
172172
"exports.setup = function(options, seedLink) {",
173173
" dbm = options.dbmigrate;",
174-
" ignoreOnInit = dbm.getInstance().internals.argv['ignore-on-init']",
174+
" ignoreOnInit = options.ignoreOnInit",
175175
" type = dbm.dataType;",
176176
" seed = seedLink;",
177177
"};",

0 commit comments

Comments
 (0)