Merge pull request #14593 from gary-alway/disable-migrations-config

This commit is contained in:
Jean-Sébastien Herbaux 2022-12-28 14:58:52 +01:00 committed by GitHub
commit 29e6833f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,8 @@ class Database {
connection: {},
settings: {
forceMigration: true,
runMigrations: true,
...config.settings,
},
...config,
};

View File

@ -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();