twenty/server/ormconfig.ts
Weiko 1cf08c797f
Convert metadata tables to camelCase (#2400)
* Convert metadata tables to camelCase

* datasourcemetadataid to datasourceid

* refactor metadata folders

* fix command

* move commands out of metadata

* fix seed

* rename objectId and fieldId in objectMetadataId and fieldMetadataId in FE

* fix field-metadata

* Fix

* Fix

* remove logs

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-11-09 20:06:10 +01:00

17 lines
518 B
TypeScript

import dotenv from 'dotenv';
import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions';
dotenv.config();
export default {
url: process.env.PG_DATABASE_URL,
type: 'postgres',
entities: [__dirname + '/src/coreV2/**/*.entity{.ts,.js}'],
synchronize: false,
migrationsRun: false,
migrationsTableName: '_typeorm_migrations',
migrations: [__dirname + '/migrations/**/*{.ts,.js}'],
cli: {
migrationsDir: __dirname + '/migrations',
},
} as PostgresConnectionOptions;