Skip to content

Commit

Permalink
Merge pull request #14593 from gary-alway/disable-migrations-config
Browse files Browse the repository at this point in the history
  • Loading branch information
Convly committed Dec 28, 2022
2 parents aa08a10 + e912c0a commit 29e6833
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/core/database/lib/index.js
Expand Up @@ -20,6 +20,8 @@ class Database {
connection: {},
settings: {
forceMigration: true,
runMigrations: true,
...config.settings,
},
...config,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/core/database/lib/migrations/index.js
Expand Up @@ -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();
Expand Down

0 comments on commit 29e6833

Please sign in to comment.