* Update cleaning script to run on old schema * Add boundaries parameter * Stop requesting data for each workspace/table * Stop checking same as seed if not requested * Minor update * Minor update * Minor update * Minor update * Minor update * Simplify result * Simplify result * Simplify result * Delete updates * Fix issues * Update logs * Remove throw when schema does not exist * Remove missing table in old schema * Remove boundaries parameter * Remove useless trycatch
26 lines
741 B
TypeScript
26 lines
741 B
TypeScript
import { ConfigService } from '@nestjs/config';
|
|
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
|
|
|
import { DataSource, DataSourceOptions } from 'typeorm';
|
|
import { config } from 'dotenv';
|
|
|
|
config();
|
|
|
|
const configService = new ConfigService();
|
|
|
|
export const typeORMMetadataModuleOptions: TypeOrmModuleOptions = {
|
|
url: configService.get<string>('PG_DATABASE_URL'),
|
|
type: 'postgres',
|
|
logging: ['error'],
|
|
schema: 'metadata',
|
|
entities: [__dirname + '/**/*.entity{.ts,.js}'],
|
|
synchronize: false,
|
|
migrationsRun: false,
|
|
migrationsTableName: '_typeorm_migrations',
|
|
migrations: [__dirname + '/migrations/*{.ts,.js}'],
|
|
};
|
|
|
|
export const connectionSource = new DataSource(
|
|
typeORMMetadataModuleOptions as DataSourceOptions,
|
|
);
|