title: Sequelize migrate failing due to dialect object Object not supported error
body: <p><strong>Background</strong></p>
  
  <p>I am creating a boilerplate express application. I have configured a database connection using pg and sequelize. When I add the cli and try to run <code>sequlize db:migrate</code> I get this error,</p>
  
  <blockquote>
    <p>ERROR: The dialect [object Object] is not supported. Supported
    dialects: mssql, mysql, postgres, and sqlite.</p>
  </blockquote>
  
  <p><strong>Replicate</strong></p>
  
  <p>Generate a new express application. Install pg, pg-hstore, sequelize and sequelize-cli. </p>
  
  <p>Run <code>sequelize init</code>.</p>
  
  <p>Add a config.js file to the /config path that was created from sequelize init. </p>
  
  <p>Create the connection in the config.js file. </p>
  
  <p>Update the config.json file created by sequelize-cli. </p>
  
  <p>Run <code>sequelize db:migrate</code> </p>
  
  <p><strong>Example</strong> </p>
  
  <p><em>/config/config.js</em></p>
  
  <pre><code>const Sequelize = require('sequelize');
  const { username, host, database, password, port } = require('../secrets/db');
  
  const sequelize = new Sequelize(database, username, password, {
    host,
    port,
    dialect: 'postgres',
    operatorsAliases: false,
    pool: {
      max: 5,
      min: 0,
      acquire: 30000,
      idle: 10000
    }
  });
  
  module.exports = sequelize;
  </code></pre>
  
  <p><em>/config/config.js</em></p>
  
  <pre><code>{
    "development": {
      "username": "user",
      "password": "pass",
      "database": "db",
      "host": "host",
      "dialect": "postgres"
    },
    "test": {
      "username": "user",
      "password": "pass",
      "database": "db",
      "host": "host",
      "dialect": "postgres"
    },
    "production": {
      "username": "user",
      "password": "pass",
      "database": "db",
      "host": "host",
      "dialect": "postgres"
    }
  }
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>I expect the initial migrations to run but instead get an error,</p>
  
  <blockquote>
    <p>ERROR: The dialect [object Object] is not supported. Supported
    dialects: mssql, mysql, postgres, and sqlite.</p>
  </blockquote>
  
  <p><strong>Versions</strong></p>
  
  <pre><code>Dialect: postgres 
  Dialect version: "pg":7.4.3 
  Sequelize version: 4.38.0
  Sequelize-Cli version: 4.0.0
  </code></pre>
  
  <p><em>Package Json</em></p>
  
  <pre><code>"pg": "^7.4.3",
  "pg-hstore": "^2.3.2",
  "sequelize": "^4.38.0"
  </code></pre>
  
  <p><em>Installed globally</em></p>
  
  <pre><code>npm install -g sequelize-cli
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>Now that the major rewrite has been released for sequelize, what is the proper way to add the dialect so the migrations will run?</p>
  
  <p>It is important to note that my connection is working fine. I can query the database without problems, only <code>sequelize-cli</code> will not work when running migrations.</p>