feat(migrasi) config migrasi
parent
f5c1008ece
commit
35b9ffd306
|
@ -0,0 +1,16 @@
|
||||||
|
import { DataSource } from 'typeorm';
|
||||||
|
import * as dotenv from 'dotenv';
|
||||||
|
|
||||||
|
dotenv.config();
|
||||||
|
export const connectionSource = new DataSource({
|
||||||
|
type: 'postgres',
|
||||||
|
host: process.env.DEFAULT_DB_HOST,
|
||||||
|
port: parseInt(process.env.DEFAULT_DB_PORT),
|
||||||
|
username: process.env.DEFAULT_DB_USER,
|
||||||
|
password: process.env.DEFAULT_DB_PASS,
|
||||||
|
database: process.env.DEFAULT_DB_NAME,
|
||||||
|
entities: ['src/modules/user-related/**/data/models/*.ts'],
|
||||||
|
migrationsTableName: 'migrations',
|
||||||
|
migrations: ['src/database/migrations/*.ts'],
|
||||||
|
synchronize: false,
|
||||||
|
});
|
Loading…
Reference in New Issue