title: Invalid default value for 'updated_at' in mysql
body: <blockquote>
    <p>Caused by: java.sql.SQLException: Invalid default value for
    'updated_at' Query: </p>
  </blockquote>
  
  <pre><code>CREATE TABLE IF NOT EXISTS saved_query (id int(11)
  NOT NULL AUTO_INCREMENT,name varchar(255) NOT NULL,description
   varchar(255) DEFAULT NULL,query longtext,params_json
  longtext,created_at timestamp DEFAULT CURRENT_TIMESTAMP,updated_at
  =timestamp NOT NULL,  PRIMARY KEY (id)) Parameters: []
  </code></pre>
  
  <p>Pasting the query for readability: </p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS saved_query 
  ( 
   id          INT(11) NOT NULL auto_increment, 
   name        VARCHAR(255) NOT NULL, 
   description VARCHAR(255) DEFAULT NULL, 
   query       LONGTEXT, 
   params_json LONGTEXT, 
   created_at  TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
   updated_at  TIMESTAMP NOT NULL, 
   PRIMARY KEY (id) 
  ) 
  </code></pre>
  
  <p>Mysql version is <code>5.7.13</code>. The query above works in versions <code>5.6</code> and <code>5.5</code>. The following query works in <code>5.7</code> but not in <code>&lt;5.7</code> versions: </p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS saved_query 
    ( 
       id          INT(11) NOT NULL auto_increment, 
       name        VARCHAR(255) NOT NULL, 
       description VARCHAR(255) DEFAULT NULL, 
       query       LONGTEXT, 
       params_json LONGTEXT, 
       created_at  TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
       updated_at  TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
       PRIMARY KEY (id) 
    ) 
  </code></pre>
  
  <p>The error in <code>5.6</code> is: </p>
  
  <blockquote>
    <p>Caused by: java.sql.SQLException: Incorrect table definition; there
    can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or
    ON UPDATE clause Query:</p>
  </blockquote>
  
  <pre><code> CREATE TABLE IF NOT EXISTS saved_query (id
   int(11) NOT NULL AUTO_INCREMENT,name varchar(255) NOT NULL,description
   varchar(255) DEFAULT NULL,query longtext,params_json
   longtext,created_at timestamp DEFAULT CURRENT_TIMESTAMP,updated_at
   timestamp DEFAULT CURRENT_TIMESTAMP,  PRIMARY KEY (id)) Parameters: []
  </code></pre>
  
  <p>What should be the query that works in all these versions? </p>