diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-11-13 08:40:20 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-06 19:04:25 +0800 |
commit | e69cdfb7b5b0b4c7517d5439d45888702c6a1b71 (patch) | |
tree | afe81359d658671d470874db8718375d5f6925fd /packages/pipeline/src/ormconfig.ts | |
parent | 45da317e15960037024d9c04c1a08135a2889843 (diff) | |
download | dexon-sol-tools-e69cdfb7b5b0b4c7517d5439d45888702c6a1b71.tar dexon-sol-tools-e69cdfb7b5b0b4c7517d5439d45888702c6a1b71.tar.gz dexon-sol-tools-e69cdfb7b5b0b4c7517d5439d45888702c6a1b71.tar.bz2 dexon-sol-tools-e69cdfb7b5b0b4c7517d5439d45888702c6a1b71.tar.lz dexon-sol-tools-e69cdfb7b5b0b4c7517d5439d45888702c6a1b71.tar.xz dexon-sol-tools-e69cdfb7b5b0b4c7517d5439d45888702c6a1b71.tar.zst dexon-sol-tools-e69cdfb7b5b0b4c7517d5439d45888702c6a1b71.zip |
Configure TypeORM for migrations. Add new package.json scripts.
Diffstat (limited to 'packages/pipeline/src/ormconfig.ts')
-rw-r--r-- | packages/pipeline/src/ormconfig.ts | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/packages/pipeline/src/ormconfig.ts b/packages/pipeline/src/ormconfig.ts index 39b496ace..95c27eeba 100644 --- a/packages/pipeline/src/ormconfig.ts +++ b/packages/pipeline/src/ormconfig.ts @@ -20,28 +20,13 @@ const entities = [ Transaction, ]; -export const testConfig: ConnectionOptions = { - type: 'sqlite', - database: 'database.sqlite', - synchronize: true, - logging: false, - entities, - migrations: ['./lib/src/migrations/**/*.js'], - cli: { - entitiesDir: 'lib/src/entities', - migrationsDir: 'lib/src/migrations', - }, -}; - -export const deployConfig: ConnectionOptions = { +const config: ConnectionOptions = { type: 'postgres', url: process.env.ZEROEX_DATA_PIPELINE_DB_URL, - synchronize: true, + synchronize: false, logging: false, entities, - migrations: ['./lib/src/migrations/**/*.js'], - cli: { - entitiesDir: 'lib/src/entities', - migrationsDir: 'lib/src/migrations', - }, + migrations: ['./lib/migrations/**/*.js'], }; + +module.exports = config as ConnectionOptions; |