I have a table that is as follows:
CREATE TABLE SomeTable ( id int unsigned NOT NULL AUTO_INCREMENT, status enum('broken','repaired') NOT NULL, from datetime NOT NULL, until datetime NOT NULL, brought_in timestamp, brought_by varchar(255) NOT NULL, repair_status enum('unpayed', 'payed') DEFAULT NULL, payed_when timestamp, delivered_when timestamp, primary key(id) );
When I create the table if I do a
SHOW CREATE TABLE then I see that the column
brought_in is defined to have the current timestamp
ON INSERT and
But I did not add such an instruction in my create table.
Why doesn't it let it be empty like the other columns?
Now on every insert or update of another column it adds the current timestamp. I don't want that.
It does not do that with the other columns. What am I doing wrong?