FrizenVladyslav
5/6/2020 - 10:34 AM

ormconfig TS

import { ConnectionOptions } from 'typeorm';
import config from './common/config';

const typeormConfig: ConnectionOptions = {
  type: 'mysql',
  ...config.DB,
  entities: [__dirname + '/**/*.entity{.ts,.js}'],
  migrationsTableName: 'migrations-typeorm',
  migrations: [__dirname + '../typeorm/migrations/**/*{.ts,.js}'],
  cli: {
    migrationsDir: '../typeorm/migration',
  },
};

export = typeormConfig;