You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE lovd_announcements (
id SMALLINT(5) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
type VARCHAR(15) NOT NULL DEFAULT "information",
announcement TEXT NOT NULL,
start_date DATETIME NOT NULL DEFAULT "0000-00-00 00:00:00",
end_date DATETIME NOT NULL DEFAULT "9999-12-31 23:59:59",
lovd_read_only BOOLEAN NOT NULL DEFAULT 0,
created_by SMALLINT(5) UNSIGNED ZEROFILL,
created_date DATETIME NOT NULL,
edited_by SMALLINT(5) UNSIGNED ZEROFILL,
edited_date DATETIME,
PRIMARY KEY (id),
INDEX (created_by),
INDEX (edited_by),
CONSTRAINT lovd_announcements_fk_created_by FOREIGN KEY (created_by) REFERENCES lovd_users (id) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT lovd_announcements_fk_edited_by FOREIGN KEY (edited_by) REFERENCES lovd_users (id) ON DELETE SET NULL ON UPDATE CASCADE)
ENGINE=InnoDB,
DEFAULT CHARACTER SET utf8
I got: [42000] [1067] [Invalid default value for 'start_date']
Fixed replacing start_date DATETIME NOT NULL DEFAULT "0000-00-00 00:00:00" with start_date DATETIME NOT NULL DEFAULT "1000-01-01 00:00:00"
The text was updated successfully, but these errors were encountered:
…allation.
- This occurs on newer MySQL versions that have STRICT_MODE enabled by default as well as NO_ZERO_DATE, which disallows a zero date and returns a fatal error.
- This fix works by removing the NO_ZERO_DATE SQL mode for the session that LOVD runs in.
- Closes#143.
- Closes#173.
Error during install while running query.
I ran:
I got:
[42000] [1067] [Invalid default value for 'start_date']
Fixed replacing
start_date DATETIME NOT NULL DEFAULT "0000-00-00 00:00:00"
with
start_date DATETIME NOT NULL DEFAULT "1000-01-01 00:00:00"
The text was updated successfully, but these errors were encountered: