title: Sequelize CLI migration error "Cannot read property 'type' of undefined" when creating table with db:migrate
body: <p>I'm running <code>yarn sequelize db:migrate</code> to create the table in the database using a postgres image in the docker and returns the following message:</p>
  <pre><code>mateus @ fariasmateuss: ~ / Projects / gobarber / server $ yarn sequelize db: migrate
  yarn run v1.22.4
  
  $ /home/mateus/Projects/gobarber/server/node_modules/.bin/sequelize db: migrate
  
  Sequelize CLI [Node: 12.17.0, CLI: 6.0.0, ORM: 6.2.0]
  
  Loaded configuration file &quot;src / config / database.js&quot;.
  == 20200627041347-create-users: migrating =======
  
  ERROR: Cannot read property 'type' of undefined
  
  error Command failed with exit code 1.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command
  </code></pre>
  <p>Configuration of the <code>.sequelizerc</code> file:</p>
  <pre><code>const {resolve} = require ('path');
  
  module.exports = {
    config: resolves (__ dirname, 'src', 'config', 'database.js'),
    'models-path': resolves (__ dirname, 'src', 'app', 'models'),
    'migrations-path': resolves (__ dirname, 'src', 'database', 'migrations'),
    'seeders-path': resolves (__ dirname, 'src', 'database', 'seeds'),
  };
  </code></pre>
  <p>Code to create the table in the file <code>migrations.js</code>:</p>
  <pre><code>module.exports = {
    up: (queryInterface, Sequelize) =&gt; {
      return queryInterface.createTable ('users', {
        id: {
          type: Sequelize.INTEGER,
          allowNull: false,
          autoIncrement: true,
          primaryKey: true,
        },
        name: {
          type: Sequelize.STRING,
          allowNull: false,
        },
        email: {
          type: Sequelize.STRING,
          allowNull: false,
          unique: true,
        },
        password_hash: {
          type: Sequelize.STRING,
          allowNull: false,
        },
        provider: {
          type: Sequelize.BOOLEAN,
          defaultValues: false,
          allowNull: false,
        },
        created_at: {
          type: Sequelize.DATA,
          allowNull: false,
        },
        updated_at: {
          type: Sequelize.DATA,
          allowNull: false,
        },
      });
    },
  
    down: (queryInterface) =&gt; {
      return queryInterface.dropTable ('users');
    },
  };
  </code></pre>
  <blockquote>
  <p>OS: Linux Focal Fossa 20.04 LTS</p>
  </blockquote>
  <p>Would anyone know what the possible solution would be?</p>