use a *very* long statement_timeout for migrations

some migrations still timeout with the ×10, let's hope that ×100 is
enough!

(if people have not set a timeout in the configuration files, this
commit changes the migration timeout from 1m40s to 16m40s)
This commit is contained in:
dakkar 2025-06-20 14:01:17 +01:00
parent 8926ba06a6
commit 85f7813d75

View file

@ -14,7 +14,7 @@ export default new DataSource({
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,
statement_timeout: (config.db.extra?.statement_timeout ?? 1000 * 10) * 100,
},
entities: entities,
migrations: ['migration/*.js'],