module.exports = {
  development: {
    client: 'pg',
    connection: {
      database: 'bshed_development',
      host: '127.0.0.1',
      port: '5432',
      user: 'root'
    },
    migrations: {
      tableName: 'knex_migrations'
    }
  },
  production: {
    client: 'pg',
    connection: process.env.DATABASE_URL,
    migrations: {
      tableName: 'knex_migrations'
    }
  },
  test: {
    client: 'pg',
    connection: {
      database: 'bshed_test',
      host: '127.0.0.1',
      port: '5432',
      user: 'root'
    },
    migrations: {
      tableName: 'knex_migrations'
    }
  }
}

const config = require('server/config')
const bshedConfig = config.get('bshed')

module.exports = {
  client: 'pg',
  connection: bshedConfig.drivers.pg,
  migration: {
    tableName: 'knex_migrations'
  }
}

Update knew config