From 43544a6479c0a16869018c71180934b3564047d3 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 9 Mar 2024 15:38:36 +0000 Subject: [PATCH] longer `statement_timeout` for migrations - fixes 450 --- packages/backend/ormconfig.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/backend/ormconfig.js b/packages/backend/ormconfig.js index 229e5bf1fe..c88b3b3d65 100644 --- a/packages/backend/ormconfig.js +++ b/packages/backend/ormconfig.js @@ -11,7 +11,11 @@ export default new DataSource({ username: config.db.user, password: config.db.pass, database: config.db.db, - extra: config.db.extra, + extra: { + ...config.db.extra, + // migrations may be very slow, give them longer to run (that 10*1000 comes from postgres.ts) + statement_timeout: (config.db.extra?.statement_timeout ?? 1000 * 10) * 10, + }, entities: entities, migrations: ['migration/*.js'], });