2023-11-08 13:26:52 +03:00
|
|
|
import dotenv from 'dotenv';
|
|
|
|
import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions';
|
|
|
|
dotenv.config();
|
|
|
|
|
|
|
|
export default {
|
|
|
|
url: process.env.PG_DATABASE_URL,
|
|
|
|
type: 'postgres',
|
2023-11-19 20:25:47 +03:00
|
|
|
entities: [__dirname + '/src/core/**/*.entity{.ts,.js}'],
|
2023-11-08 13:26:52 +03:00
|
|
|
synchronize: false,
|
2023-11-10 17:33:25 +03:00
|
|
|
migrationsRun: false,
|
2023-11-08 13:26:52 +03:00
|
|
|
migrationsTableName: '_typeorm_migrations',
|
|
|
|
migrations: [__dirname + '/migrations/**/*{.ts,.js}'],
|
|
|
|
cli: {
|
|
|
|
migrationsDir: __dirname + '/migrations',
|
|
|
|
},
|
|
|
|
} as PostgresConnectionOptions;
|