Skip to main content

TypeORM

https://robinck.github.io/typeorm-fixtures/

// https://nartc.netlify.app/blogs/introduction-to-automapper-typescript/ // https://github.com/Tevpro/nest-automapper-demo // https://github.com/C2FO/fast-csv

// autoLoadEntities: true,

// const config = { // type: 'better-sqlite3', // database: './gateway-db.sqlite', // dropSchema: true, // entities: [UserEntity, ProductEntity], // synchronize: true, // };

,

  public getTypeOrmConfig(): TypeOrmModuleOptions {
return {
...this.getDatabaseConfig(),

// migrationsTableName: 'migration',
// migrations: ['apps/api-gateway/src/migrations/*.ts'],
// cli: {
// migrationsDir: 'apps/api-gateway/src/migrations',
// },

ssl: this.isProduction(),

autoLoadEntities: true,
dropSchema: !this.isProduction(),
synchronize: !this.isProduction(),
};
}