title: Sequelize is setting PSQL to VARCHAR(255) regardless if I tell it TEXT(2048) or any other length
body: <p>When I follow the instructions on how to create a larger field in psql through sequelize, it still always pushes <code>VARCHAR(255)</code> when it creates the table. <a href="http://docs.sequelizejs.com/manual/tutorial/models-definition.html#data-types" rel="nofollow noreferrer">Sequelize Data Types</a></p>
  
  <p>Here's my sequelize model:</p>
  
  <pre><code>'use strict';
  
  module.exports = (sequelize, DataTypes) =&gt; {
    const Message = sequelize.define(
      'Message',
      {
        message: {
          type: DataTypes.STRING(2048),
          allowNull: false,
          validate: {
            notEmpty: true
          }
        }
      },
      {}
    );
    Message.associate = function(models) {
      // associations can be defined here
    };
    return Message;
  };
  </code></pre>
  
  <p><code>DataTypes.TEXT</code> has the same result.</p>
  
  <p>Here's the SQL that it outputs:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS "Messages" ("id" SERIAL , "message" VARCHAR(255) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, PRIMARY KEY ("id"));
  </code></pre>
  
  <p>When I try to insert a large string (more than 255 characters) into this field, it gives me the following error:</p>
  
  <p><code>error: value too long for type character varying(255)</code></p>
  
  <p>I've tried the following github issues on the project, but they don't seem to work for me. <a href="https://github.com/sequelize/sequelize/issues?utf8=%E2%9C%93&amp;q=error%3A%20value%20too%20long%20for%20type%20character%20varying%28255%29" rel="nofollow noreferrer">Relevant github issues.</a></p>
  
  <p>Thank you for any help.</p>
  
  <p><strong>Specs:</strong></p>
  
  <p>psql (PostgreSQL) <code>10.5</code></p>
  
  <p>node <code>v10.4.0</code>.</p>
  
  <pre><code>"dependencies": {
      "pg": "^7.5.0",
      "pg-hstore": "^2.3.2",
      "sequelize": "^4.39.0",
      "sequelize-cli": "^5.2.0"
    }
  </code></pre>