createdAt field is as following:
createdAt timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
I run the query try to modify the createdAt field to drop the on update CURRENT_TIMESTAMP.
So when the record is created. createdAt will be using the CURRENT_TIMESTAMP, but later on, when the record is updated, createAt should not auto updated to the current_timestamp. It should still keep the value when it is created.
The field modification query is as following,
ALTER TABLE MyTable CHANGE createdAt createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
But after I run it. the createAt field is still the same
createdAt timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
the on update CURRENT_TIMESTAMP is not dropped.
Does default CURRENT_TIMESTAMP always have to be with "on update CURRENT_TIMESTAMP"
Thanks!