aboutsummaryrefslogblamecommitdiffstats
path: root/packages/pipeline/src/ormconfig.ts
blob: fd6c7c39b71db4f7015f60f239067fa8a89bc17c (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                            

          
             




                            
                               
                  




                    
             




                            
                               
                  


                
                                   

                                                 
                       
                       
             
                                             
  
 
                        
import { ConnectionOptions } from 'typeorm';

import {
    Block,
    DexTrade,
    ExchangeCancelEvent,
    ExchangeCancelUpToEvent,
    ExchangeFillEvent,
    Relayer,
    SraOrder,
    SraOrdersObservedTimeStamp,
    TokenMetadata,
    Transaction,
} from './entities';

const entities = [
    Block,
    DexTrade,
    ExchangeCancelEvent,
    ExchangeCancelUpToEvent,
    ExchangeFillEvent,
    Relayer,
    SraOrder,
    SraOrdersObservedTimeStamp,
    TokenMetadata,
    Transaction,
];

const config: ConnectionOptions = {
    type: 'postgres',
    url: process.env.ZEROEX_DATA_PIPELINE_DB_URL,
    synchronize: false,
    logging: ['error'],
    entities,
    migrations: ['./lib/migrations/**/*.js'],
};

module.exports = config;