mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Merge pull request #14593 from gary-alway/disable-migrations-config
This commit is contained in:
commit
29e6833f13
@ -20,6 +20,8 @@ class Database {
|
|||||||
connection: {},
|
connection: {},
|
||||||
settings: {
|
settings: {
|
||||||
forceMigration: true,
|
forceMigration: true,
|
||||||
|
runMigrations: true,
|
||||||
|
...config.settings,
|
||||||
},
|
},
|
||||||
...config,
|
...config,
|
||||||
};
|
};
|
||||||
|
@ -61,7 +61,7 @@ const createMigrationsProvider = (db) => {
|
|||||||
async shouldRun() {
|
async shouldRun() {
|
||||||
const pending = await migrations.pending();
|
const pending = await migrations.pending();
|
||||||
|
|
||||||
return pending.length > 0;
|
return pending.length > 0 && db.settings.runMigrations;
|
||||||
},
|
},
|
||||||
async up() {
|
async up() {
|
||||||
await migrations.up();
|
await migrations.up();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user