Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

fix: synchronization false unless tests #292

Merged
merged 1 commit into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ormconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export const config: ConnectionOptions = {
type: 'postgres',
url: POSTGRES_URI,
entities,
synchronize: true,
// Disable synchronization in production
synchronize: process.env.NODE_ENV && process.env.NODE_ENV === 'test',
logging: true,
logger: 'debug',
extra: {
Expand Down
1 change: 1 addition & 0 deletions test/test_env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ RFQT_MAKER_ASSET_OFFERINGS='{"https://mock-rfqt1.club":[["0x871dd7c2b4b25e1aa187
META_TXN_RELAY_ADDRESS=0x9eFCa436873b55a0d6AEa260f92DE50150360dca
META_TXN_RELAY_PRIVATE_KEY=82b9c3b8d45f608badd8fda250a0d95088381540e850734519b659e1e1ac3e71
META_TXN_RATE_LIMITER_CONFIG='{"api_key":{"daily":{"allowedDailyLimit": 1}}}'
NODE_ENV=test