title: How do I remove ON UPDATE CURRENT_TIMESTAMP from an existing column?
body: <p>I did a dump of a mysql 5.5 database and loaded it into a 5.6 server.</p>
  
  <p>The dump added ON UPDATE CURRENT_TIMESTAMP to a bunch of columns that didn't have it previously.</p>
  
  <p>I'm searching for an <code>ALTER TABLE</code> statement that will remove the ON UPDATE CURRENT_TIMESTAMP rule without making any other changes. In my imagination it should be something like <code>ON UPDATE NOOP</code> or <code>ON UPDATE NO_CURRENT_TIMESTAMP</code>.</p>
  
  <p><code>ON UPDATE JUST_BE_A_NORMAL_COLUMN</code>?</p>
  
  <p>I tried using the "Clear default" option in mysql workbench and it did the opposite of what it should have done - it gave the column a default!</p>
  
  <p>I was able to get rid of the default with <code>ALTER TABLE t ALTER COLUMN c DROP DEFAULT</code>, so the column is mandatory in INSERTs (just like it was before the dump/reload, as I wanted it) but the unwanted behavior on UPDATEs remains.</p>
  
  <p>I have not enabled the <code>explicit_defaults_for_timestamp</code> option. If I was starting fresh I'd definitely use that option since it seems a lot more sane. But since I already had the columns configured the way I wanted them in 5.5, I expected them to keep the same semantics when transferred to 5.6. Apparently mysqldump just wasn't smart enough.</p>
  
  <p>At this point I'm not sure I understand what effects would result from enabling <code>explicit_defaults_for_timestamp</code>. Would that option change the behavior of existing tables, or does it only change the interpretation of future CREATE TABLE commands? Would turning it on somehow help me fix the broken columns?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>A similar question is <a href="https://stackoverflow.com/q/9748954/2404501">here</a> but that one is about creating a new table, not altering an existing column. In fact that question is the one I used as a guide when creating the tables on the 5.5 server. I used the 2-step procedure: create with default 0 to suppress ON UPDATE CURRENT_TIMESTAMP, then drop default.</p>
  
  <p>The 2-step procedure definitely doesn't produce the correct result on the 5.6 server without explicit_defaults_for_timestamp; this is a sign that either 5.6 doesn't perfectly imitate the old behavior in this mode, or the old server never did what I thought it was doing. I can't be sure which.</p>