chore: Use ts migration files also for test env

This commit is contained in:
Faruk AYDIN
2023-10-01 17:51:15 +02:00
parent 0e5529b4ca
commit 9228722147
2 changed files with 3 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
import appConfig from './src/config/app';
const fileExtension = appConfig.isDev ? 'ts' : 'js';
const fileExtension = appConfig.isDev || appConfig.isTest ? 'ts' : 'js';
const knexConfig = {
client: 'pg',

View File

@@ -17,6 +17,7 @@ type AppConfig = {
appEnv: string;
logLevel: string;
isDev: boolean;
isTest: boolean;
isProd: boolean;
postgresDatabase: string;
postgresSchema: string;
@@ -89,6 +90,7 @@ const appConfig: AppConfig = {
appEnv: appEnv,
logLevel: process.env.LOG_LEVEL || 'info',
isDev: appEnv === 'development',
isTest: appEnv === 'test',
isProd: appEnv === 'production',
version: process.env.npm_package_version,
postgresDatabase: process.env.POSTGRES_DATABASE || 'automatisch_development',