Closed c0deless closed 4 years ago
Hello @c0deless ,
May I ask what database/version you are using?
If I would have to guess, it's either not MySQL or older version of MySQL. I presume it cannot set default timestamp for the date column. You can try to create a date
column without a default to see if that works or try to set CURRENT_TIMESTAMP
(notice there are no parentheses with size). E.g.:
date datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
or date datetime(6) NOT NULL,
Hopefully that helps.
Hi @Shmakov Manage to solve the issue by updating mysql . Thanks for the help.
Logs : CREATE TABLE
request
(id
int(11) NOT NULL AUTO_INCREMENT,date
datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),ip
varchar(128) DEFAULT NULL,service
varchar(16) DEFAULT NULL,request
varchar(4096) DEFAULT NULL,request_headers
mediumtext,http_request_path
varchar(1024) DEFAULT NULL,username
varchar(128) DEFAULT NULL,password
varchar(128) DEFAULT NULL, PRIMARY KEY (id
) ) ENGINE=InnoDB AUTO_INCREMENT=567132 DEFAULT CHARSET=utf8 MySQL said: Documentation1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
ip
varchar(128) DEFAULT NULL, ' at line 3