Bug 20175: [sql_modes] Set a correct default value for club_enrollments.date_created

0000-00-00 00:00:00 is not a valid timestamp.

It will fix the installer and upgrade process

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5a43228c54)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2018-02-05 14:22:59 -03:00 committed by Fridolin Somers
parent 9a5161b248
commit da0f449797
3 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
ALTER TABLE club_enrollments MODIFY date_created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP;

View File

@ -4056,7 +4056,7 @@ CREATE TABLE IF NOT EXISTS club_enrollments (
borrowernumber int(11) NOT NULL,
date_enrolled timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
date_canceled timestamp NULL DEFAULT NULL,
date_created timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
date_created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
date_updated timestamp NULL DEFAULT NULL,
branchcode varchar(10) NULL DEFAULT NULL,
PRIMARY KEY (id),

View File

@ -14199,7 +14199,7 @@ if( CheckVersion( $DBversion ) ) {
borrowernumber int(11) NOT NULL,
date_enrolled timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
date_canceled timestamp NULL DEFAULT NULL,
date_created timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
date_created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
date_updated timestamp NULL DEFAULT NULL,
branchcode varchar(10) NULL DEFAULT NULL,
PRIMARY KEY (id),