mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix: only run migrations in production
This commit is contained in:
@@ -31,9 +31,12 @@ app
|
|||||||
.then(async () => {
|
.then(async () => {
|
||||||
const dbConnection = await createConnection();
|
const dbConnection = await createConnection();
|
||||||
|
|
||||||
await dbConnection.query('PRAGMA foreign_keys=OFF');
|
// Run migrations in production
|
||||||
await dbConnection.runMigrations();
|
if (process.env.NODE_ENV === 'production') {
|
||||||
await dbConnection.query('PRAGMA foreign_keys=ON');
|
await dbConnection.query('PRAGMA foreign_keys=OFF');
|
||||||
|
await dbConnection.runMigrations();
|
||||||
|
await dbConnection.query('PRAGMA foreign_keys=ON');
|
||||||
|
}
|
||||||
|
|
||||||
// Load Settings
|
// Load Settings
|
||||||
const settings = getSettings().load();
|
const settings = getSettings().load();
|
||||||
|
Reference in New Issue
Block a user