mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 07:10:57 +00:00
export loading
This commit is contained in:
@@ -105,9 +105,14 @@ export default registerAs("database", (): TypeOrmModuleOptions => {
|
||||
password: process.env.DB_PASSWORD ?? "",
|
||||
database: process.env.DB_NAME ?? "edr_freight",
|
||||
schema: "public",
|
||||
extra: {
|
||||
options: `-c search_path=${APPLICATION_SEARCH_PATH}`,
|
||||
},
|
||||
// The `-c search_path=...` startup option is rejected by transaction-pooling
|
||||
// poolers (e.g. PgBouncer: "unsupported startup parameter in options"). When
|
||||
// behind such a pooler set DB_PGBOUNCER=true and instead make the search_path
|
||||
// a role default: ALTER ROLE <user> IN DATABASE <db> SET search_path TO
|
||||
// public,iam,freight,audit;
|
||||
...(process.env.DB_PGBOUNCER === "true"
|
||||
? {}
|
||||
: { extra: { options: `-c search_path=${APPLICATION_SEARCH_PATH}` } }),
|
||||
entities: [__dirname + "/../**/*.entity.{ts,js}", ...iamEntities],
|
||||
autoLoadEntities: true,
|
||||
migrations: [
|
||||
|
||||
Reference in New Issue
Block a user