{"action":"created","issue":{"url":"https://api.github.com/repos/dreamwidth/dw-free/issues/1822","repository_url":"https://api.github.com/repos/dreamwidth/dw-free","labels_url":"https://api.github.com/repos/dreamwidth/dw-free/issues/1822/labels{/name}","comments_url":"https://api.github.com/repos/dreamwidth/dw-free/issues/1822/comments","events_url":"https://api.github.com/repos/dreamwidth/dw-free/issues/1822/events","html_url":"https://github.com/dreamwidth/dw-free/issues/1822","id":161534574,"number":1822,"title":"The 'lastlogin' field in the 'clientusage' database table no longer has a valid default as of Ubuntu 16.04 LTS","user":{"login":"Sophira","id":1545217,"avatar_url":"https://avatars.githubusercontent.com/u/1545217?v=3","gravatar_id":"","url":"https://api.github.com/users/Sophira","html_url":"https://github.com/Sophira","followers_url":"https://api.github.com/users/Sophira/followers","following_url":"https://api.github.com/users/Sophira/following{/other_user}","gists_url":"https://api.github.com/users/Sophira/gists{/gist_id}","starred_url":"https://api.github.com/users/Sophira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sophira/subscriptions","organizations_url":"https://api.github.com/users/Sophira/orgs","repos_url":"https://api.github.com/users/Sophira/repos","events_url":"https://api.github.com/users/Sophira/events{/privacy}","received_events_url":"https://api.github.com/users/Sophira/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dreamwidth/dw-free/labels/status:%20untriaged","name":"status: untriaged","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-21T20:42:35Z","updated_at":"2016-06-21T20:46:34Z","closed_at":null,"body":"When running \"$LJHOME/bin/upgrading/update-db.pl -r --innodb\" on Ubuntu 16.04 LTS (MySQL v14.14) for setting up a new Dreamhack installation, MySQL chokes on one of our table definitions:\r\n\r\n>     CREATE TABLE clientusage (\r\n>         userid int(10) unsigned NOT NULL default '0',\r\n>         clientid smallint(5) unsigned NOT NULL default '0',\r\n>         lastlogin datetime NOT NULL default '0000-00-00 00:00:00',\r\n>     \r\n>         PRIMARY KEY  (clientid,userid),\r\n>         UNIQUE KEY userid (userid,clientid)\r\n>     )\r\n>      ENGINE=INNODB;\r\n>     # Running...\r\n>     #  ERROR: Invalid default value for 'lastlogin'\r\n\r\n...and the process stops there. It seems that later versions of MySQL don't allow for '0000-00-00 00:00:00' as a default value. I'm not sure if changing this would have any unintended side-effects in the code, however.\r\n\r\nWe should probably be allowing the field to be NULL instead, and changing any checks for the 'special' date (if any exist) to check for NULL instead.\r\n\r\nOutput of `mysql -V`:\r\n\r\n>     mysql  Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using  EditLine wrapper"},"comment":{"url":"https://api.github.com/repos/dreamwidth/dw-free/issues/comments/227566544","html_url":"https://github.com/dreamwidth/dw-free/issues/1822#issuecomment-227566544","issue_url":"https://api.github.com/repos/dreamwidth/dw-free/issues/1822","id":227566544,"user":{"login":"alierak","id":2009534,"avatar_url":"https://avatars.githubusercontent.com/u/2009534?v=3","gravatar_id":"","url":"https://api.github.com/users/alierak","html_url":"https://github.com/alierak","followers_url":"https://api.github.com/users/alierak/followers","following_url":"https://api.github.com/users/alierak/following{/other_user}","gists_url":"https://api.github.com/users/alierak/gists{/gist_id}","starred_url":"https://api.github.com/users/alierak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alierak/subscriptions","organizations_url":"https://api.github.com/users/alierak/orgs","repos_url":"https://api.github.com/users/alierak/repos","events_url":"https://api.github.com/users/alierak/events{/privacy}","received_events_url":"https://api.github.com/users/alierak/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T20:46:34Z","updated_at":"2016-06-21T20:46:34Z","body":"Anything wrong with using a unix timestamp in an int field instead?"}}
{"actor":{"display_login":"alierak"}}