honor schema from env
This commit is contained in:

committed by
Faruk AYDIN

parent
270039d211
commit
47212c37c2
@@ -7,11 +7,12 @@ const knexConfig = {
|
||||
connection: {
|
||||
host: appConfig.postgresHost,
|
||||
port: appConfig.postgresPort,
|
||||
user: appConfig.postgresUsername,
|
||||
password: appConfig.postgresPassword,
|
||||
user: 'postgres' || appConfig.postgresUsername,
|
||||
password: '@Sql2023' || appConfig.postgresPassword,
|
||||
database: appConfig.postgresDatabase,
|
||||
ssl: appConfig.postgresEnableSsl,
|
||||
},
|
||||
searchPath: [appConfig.databaseSchema],
|
||||
pool: { min: 0, max: 20 },
|
||||
migrations: {
|
||||
directory: __dirname + '/src/db/migrations',
|
||||
|
@@ -11,6 +11,7 @@ type AppConfig = {
|
||||
appEnv: string;
|
||||
isDev: boolean;
|
||||
postgresDatabase: string;
|
||||
databaseSchema: string;
|
||||
postgresPort: number;
|
||||
postgresHost: string;
|
||||
postgresUsername: string;
|
||||
@@ -81,6 +82,7 @@ const appConfig: AppConfig = {
|
||||
isDev: appEnv === 'development',
|
||||
version: process.env.npm_package_version,
|
||||
postgresDatabase: process.env.POSTGRES_DATABASE || 'automatisch_development',
|
||||
databaseSchema: process.env.DATABASE_SCHEMA || 'public',
|
||||
postgresPort: parseInt(process.env.POSTGRES_PORT || '5432'),
|
||||
postgresHost: process.env.POSTGRES_HOST || 'localhost',
|
||||
postgresUsername:
|
||||
|
Reference in New Issue
Block a user