knex migration - 'ER_INVALID_DEFAULT: Invalid default value for 'timestamp'
<p>I have a knex chema migration to create a table where one of the rows is -</p>
<pre class="brush:php;toolbar:false;">exports.up = async function(knex) {
return knex.schema.createTable("newTable", table => {
table.timestamp("timestamp").notNullable();
})
}</pre>
<p>I encountered an error<code>ER_INVALID_DEFAULT: Invalid default value for 'timestamp'</code></p>
<p>I've tried giving a default value of null and removing notNullable(), or giving a default value of CURRENT_TIMESTAMP, but neither seems to work (maybe there's something wrong with my syntax?)</p>
<p>I would appreciate any help! </p>