This plugin will check your posts, comments and other content for broken links and missing images, and notify you if any are found. (non-commercial community fork of broken-link-checker)
10
stars
4
forks
source link
Change DB schema due to "zero date" content issue #22
`first_failure` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_check` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_success` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_check_attempt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
However, in MySQL 5.7, NO_ZERO_DATE in conjunction with strict mode are defaults. This means that the above schema settings are invalid in a standard MySQL 5.7 installation.
Is there a code-dependent reason for them being set to default to zero?
If not, I think a more compatible schema would be to make them nullable.
should aim to have a null date field work just fine. DB schema would have to be incremented (there are spots in code that check for schema)
originally reported by @ghost in 2017:
https://github.com/ManageWP/broken-link-checker/issues/39
see https://wordpress.stackexchange.com/questions/67345/how-to-implement-wordpress-plugin-update-that-modifies-the-database