diff --git a/packages/core/database/lib/index.js b/packages/core/database/lib/index.js index 3e003fcbf7..300c3c8dee 100644 --- a/packages/core/database/lib/index.js +++ b/packages/core/database/lib/index.js @@ -20,6 +20,8 @@ class Database { connection: {}, settings: { forceMigration: true, + runMigrations: true, + ...config.settings, }, ...config, }; diff --git a/packages/core/database/lib/migrations/index.js b/packages/core/database/lib/migrations/index.js index 6745bdc724..5b2baea4a8 100644 --- a/packages/core/database/lib/migrations/index.js +++ b/packages/core/database/lib/migrations/index.js @@ -61,7 +61,7 @@ const createMigrationsProvider = (db) => { async shouldRun() { const pending = await migrations.pending(); - return pending.length > 0; + return pending.length > 0 && db.settings.runMigrations; }, async up() { await migrations.up();