Skip to content

Conversation

@vietlubu
Copy link

@vietlubu vietlubu commented Oct 13, 2018

File: data/schemas/logindb/cp_createlog.20080928225124.sql

Error:

Testi with MySQL 5.7 and PHP 7.1

Exception Flux_Error: Critical MySQL error in Installer/Updater: Invalid default value for 'reg_date'

Reason:

For currently reg_date defined by:

`reg_date` datetime NOT NULL default '0000-00-00 00:00:00',

But as I remember from MySQL 5.6 default '0000-00-00 00:00:00' not support anymore.

Solution:

Remove default value field reg_date. Default with 0000-00-00 00:00:00' don't make any benefit for this table.

@danieldpl
Copy link

This update is necessary for newer MySQL versions.
However, it would be better to apply an additional change:

ALTER TABLE `cp_createlog`
MODIFY COLUMN `reg_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP;

This allows the reg_date field to automatically store the account creation date without causing compatibility issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants