diff --git a/lib/options.js b/lib/options.js index 6b5e5ccb58..e1178ecca9 100644 --- a/lib/options.js +++ b/lib/options.js @@ -28,6 +28,7 @@ function defaultOptions() { dropBeforeImport: false, getLogger: defaultLogProvider, customContextFields: [], + disableDBMigration: false, }; } diff --git a/lib/server-impl.js b/lib/server-impl.js index 378ada13b1..cb257b4975 100644 --- a/lib/server-impl.js +++ b/lib/server-impl.js @@ -72,7 +72,11 @@ async function start(opts) { const logger = options.getLogger('server-impl.js'); try { - await migrator(options); + if (options.disableDBMigration) { + logger.info('DB migrations disabled'); + } else { + await migrator(options); + } } catch (err) { logger.error('Failed to migrate db', err); throw err;