title: Change column data type in MySQL without losing other metadata (DEFAULT, NOTNULL...)
body: <p>If I do:</p>
  
  <pre><code>ALTER TABLE testtable MODIFY mycolumn NEWDATATYPE;
  </code></pre>
  
  <p>I loose other definitions like NOT NULL, COMMENTS, DEFAULT values... Is there a way to do it?</p>
  
  <p><a href="http://www.postgresql.org/docs/9.3/static/ddl-alter.html#AEN2790" rel="noreferrer">In PostgreSQL I used</a>:</p>
  
  <pre><code>ALTER TABLE testtable ALTER COLUMN mycolumn NEWDATATYPE;
  </code></pre>
  
  <p>And it does what is supposed to: change the column datatype, without touching any other definition, only giving error if data types were not compatible and so on (but you can specify USING).</p>
  
  <p>I'll try a workaround, but I did a query to identify several columns across different tables to update the datatype and now I've identified that this data was lost, so I'll have to redo it considering these informations too.</p>