Sequelize datatype TEXT not working with mySQL
<p>I am using sequelize ORM with mySQL database.</p>
<p>I have a model with attribute type <em><strong><a href="http://docs.sequelizejs.com/en/latest/docs/models-definition/#data-types" rel="noreferrer">TEXT</a></strong></em> as :</p>
<pre><code>description: {
            type: Sequelize.TEXT,
            unique: true
        },
</code></pre>
<p>When I am trying to create table for the corresponding model, its giving an error message as :</p>
<blockquote>
<p>Unhandled rejection SequelizeDatabaseError:
ER_BLOB_KEY_WITHOUT_LENGTH: BLOB/TEXT column 'description' used in key
specification without a key length</p>
</blockquote>
<p>This worked fine when used with postgreSQL.
Possible reason for this error which i could think of can be that mySQL doesn't support TEXT datatype and therefore, i have to specify it as LONGTEXT.</p>
<p>If I am thinking correct or is there some other reason for the same, if someone can help.</p>