title: Sequelize migration error: Cannot read property 'length' of undefined
body: <p>This is the tutorial I followed: <a href="https://medium.com/@prajramesh93/getting-started-with-node-express-and-mysql-using-sequelize-ed1225afc3e0" rel="noreferrer">https://medium.com/@prajramesh93/getting-started-with-node-express-and-mysql-using-sequelize-ed1225afc3e0</a></p>
  
  <p>This is node js project using express + mysql where I use and ORM Sequelize. </p>
  
  <p>I get this error when trying to run <code>sequelize db:migrate</code></p>
  
  <pre><code>'use strict';
  module.exports = {
    up: (queryInterface, Sequelize) =&gt; {
      return queryInterface.createTable('Employees', {
        id: {
          allowNull: false,
          autoIncrement: true,
          primaryKey: true,
          type: Sequelize.INTEGER
        },
        name: {
          type: Sequelize.STRING
        },
        designation: {
          type: Sequelize.STRING
        },
        salary: {
          type: Sequelize.NUMBER
        },
        createdAt: {
          allowNull: false,
          type: Sequelize.DATE
        },
        updatedAt: {
          allowNull: false,
          type: Sequelize.DATE
        },
        companyId: {
          type: Sequelize.NUMBER,
          onDelete: 'CASCADE',
          references: {
            model: 'Companies',
            key: 'id',
            as: 'companyId',
          }
        }
      });
    },
    down: (queryInterface, Sequelize) =&gt; {
      return queryInterface.dropTable('Employees');
    }
  };
  </code></pre>