import Sequelize from 'sequelize'

import logger from '../helpers/logger'
import config from './config'

const { url, dialect } = config[process.env.NODE_ENV]

export default new Sequelize(url, {
  logging: msg => {
    logger.debug(msg)
  },
  dialect,
  operatorsAliases: false, // @TODO Remove this option in sequelize@>=5.0
})

import Sequelize from 'sequelize'

import config from './config'
import logger from '../helpers/logger'

const { url, dialect } = config[process.env.NODE_ENV]

export default new Sequelize(url, {
  dialect,
  logging: msg => {
    logger.debug(msg)
  },
})

Remove unneded database options after upgrading to Sequelize 5
Remove unneded database options after upgrading to Sequelize 5
