feat: Use postgres schema instead of database schema

This commit is contained in:
Faruk AYDIN
2023-04-16 16:35:14 +02:00
parent a4e7824109
commit 272bd9dc62
2 changed files with 3 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ const knexConfig = {
database: appConfig.postgresDatabase,
ssl: appConfig.postgresEnableSsl,
},
searchPath: [appConfig.databaseSchema],
searchPath: [appConfig.postgresSchema],
pool: { min: 0, max: 20 },
migrations: {
directory: __dirname + '/src/db/migrations',

View File

@@ -11,7 +11,7 @@ type AppConfig = {
appEnv: string;
isDev: boolean;
postgresDatabase: string;
databaseSchema: string;
postgresSchema: string;
postgresPort: number;
postgresHost: string;
postgresUsername: string;
@@ -82,7 +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',
postgresSchema: process.env.POSTGRES_SCHEMA || 'public',
postgresPort: parseInt(process.env.POSTGRES_PORT || '5432'),
postgresHost: process.env.POSTGRES_HOST || 'localhost',
postgresUsername: