<commit_before>import * as Sequelize from 'sequelize'

import config from '../config';

function connect(dbConfig) {
    return new Sequelize(
        dbConfig.database,
        dbConfig.user,
        dbConfig.password,
        Object.assign(
          {
            // TODO: move pool settings to config file
            pool: {
              max: 5,
              min: 0,
              idle: 10000
            },
            define: { underscored: true }
          },
          dbConfig
        )
      );
}

export default connect(config)<commit_msg>Changed initializer to typeorm<commit_after>import { createConnection } from 'typeorm';
import config from '../config';
import Affiliation from '../apps/nominations/models/affiliation'
import Attachment from '../apps/nominations/models/attachment'
import Household from '../apps/nominations/models/household'
import PhoneNumber from '../apps/nominations/models/phone-number'
import Address from '../apps/nominations/models/address'
import Child from '../apps/nominations/models/child'
import User from '../apps/nominations/models/user'
import AuthUser from '../apps/auth/user'

async function connect({db: {dialect: type, storage: database, logging, ...rest}}) {
  
  return await createConnection({type, database, entities: [Affiliation, AuthUser, User, Attachment, Household, PhoneNumber, Address, Child]});
}



export default async function() {
  return await connect(config)
}
{'fraction_non_alphanumeric': 0.11645746164574616, 'fraction_numerical': 0.0048814504881450485, 'mean_word_length': 2.8266666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1980662', 'n_tokens_mistral': 386, 'n_tokens_neox': 382, 'n_words': 110}