snomed-database-loader
snomed-database-loader copied to clipboard
MySQL Datetime no longer accept '0000-00-00 00:00:00' as default value
11:15:15 CREATE TABLE sct2_concept
( id
BIGINT NOT NULL DEFAULT 0, effectiveTime
DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', active
TINYINT NOT NULL DEFAULT 0, moduleId
BIGINT NOT NULL DEFAULT 0, definitionStatusId
BIGINT NOT NULL DEFAULT 0, supersededTime
DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (id
,effectiveTime
)) ENGINE=MyISAM DEFAULT CHARSET=utf8; Error Code: 1067. Invalid default value for 'effectiveTime' 0.0023 sec
Quoted from https://dev.mysql.com/doc/refman/5.7/en/datetime.html
The DATETIME type is used for values that contain both date and time parts. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
At the moment, I just replaced all '0000-00-00 00:00:00' to '1000-01-01 00:00:00'
disable sql_mode No Zero in Date
disabling sql_mode No Zero in Date is still not working, any other solution please?