akeeba / com_datacompliance

A tool to help you work towards EU GDPR compliance for your Joomla!™ site
GNU General Public License v3.0
14 stars 5 forks source link

Replace zero datetime with nullable datetime #32

Closed nikosdion closed 4 years ago

nikosdion commented 4 years ago

In the past we have been using DATETIME and TIMESTAMP fields which are set to NOT NULL and have a default value of 0000-00-00 00:00:00. Zero date usage has been discouraged since MySQL 5.7 released in 2013. The default SQL mode in MySQL 5.7 and later includes NO_ZERO_DATE.

In and of itself it's not a big problem. Joomla still sets the SQL mode to STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION which notably does not include the NO_ZERO_DATE mode, allowing the use of zero dates. If it didn't do that you could never migrate from Joomla 3.

Strategy: