title: MySQL error: key specification without a key length
body: <p>I have a table with a primary key that is a varchar(255). Some cases have arisen where 255 characters isn't enough. I tried changing the field to a text, but I get the following error:</p>
  
  <pre><code>BLOB/TEXT column 'message_id' used in key specification without a key length
  </code></pre>
  
  <p>how can I fix this?</p>
  
  <p>edit: I should also point out this table has a composite primary key with multiple columns.</p>