Some checks are pending
Automatisch Backend Tests / test (push) Waiting to run
Automatisch CI / linter (push) Waiting to run
Automatisch CI / start-backend-server (push) Waiting to run
Automatisch CI / start-backend-worker (push) Waiting to run
Automatisch CI / build-web (push) Waiting to run
Automatisch UI Tests / test (push) Waiting to run
28 lines
723 B
JavaScript
28 lines
723 B
JavaScript
import { knexSnakeCaseMappers } from 'objection';
|
|
|
|
const fileExtension = 'js';
|
|
|
|
const knexConfig = {
|
|
client: 'pg',
|
|
connection: {
|
|
host: process.env.POSTGRES_HOST,
|
|
user: process.env.POSTGRES_USERNAME,
|
|
port: process.env.POSTGRES_PORT,
|
|
password: process.env.POSTGRES_PASSWORD,
|
|
database: process.env.POSTGRES_DATABASE,
|
|
},
|
|
searchPath: ['public'],
|
|
pool: { min: 0, max: 20 },
|
|
migrations: {
|
|
directory: '../../packages/backend/src/db/migrations/',
|
|
extension: fileExtension,
|
|
loadExtensions: [`.${fileExtension}`],
|
|
},
|
|
seeds: {
|
|
directory: '../../packages/backend/src/db/seeds/',
|
|
},
|
|
...(process.env.APP_ENV === 'test' ? knexSnakeCaseMappers() : {}),
|
|
};
|
|
|
|
export default knexConfig;
|