Page MenuHomePhabricator

Comments extension is using zero date in own schema and failing in strict mode
Closed, ResolvedPublic

Description

Since the CI is running mysql in strict mode (T119371) the tests for this extension fails with:
Error: 1067 Invalid default value for 'Comment_Date'

The problem is '0000-00-00 00:00:00' as default value.
mediawiki/core is using varchars for timestamps

CREATE TABLE /*_*/Comments (
  CommentID int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
  Comment_Page_ID int(11) NOT NULL default 0,
  Comment_user_id int(11) NOT NULL default 0,
  Comment_Username varchar(200) NOT NULL default '',
  Comment_Text text NOT NULL,
  Comment_Date datetime NOT NULL default '0000-00-00 00:00:00',
  Comment_Parent_ID int(11) NOT NULL default 0,
  Comment_IP varchar(45) NOT NULL default ''
) /*$wgDBTableOptions*/;

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Umherirrender assigned this task to Paladox.

Seems fixed by If81c6180e0df7b26d17580ed523de2d2a080be1b