Bugzilla – Attachment 71465 Details for
Bug 20175
Set a correct default value for club_enrollments.date_created
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20175: [sql_modes] (follow-up) Set a correct default value for club_enrollments.date_created
Bug-20175-sqlmodes-follow-up-Set-a-correct-default.patch (text/plain), 2.84 KB, created by
Julian Maurice
on 2018-02-12 13:19:01 UTC
(
hide
)
Description:
Bug 20175: [sql_modes] (follow-up) Set a correct default value for club_enrollments.date_created
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 13:19:01 UTC
Size:
2.84 KB
patch
obsolete
>From 03498f19e99b979598808f352a6415a798cbbf5d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 7 Feb 2018 11:58:02 -0300 >Subject: [PATCH] Bug 20175: [sql_modes] (follow-up) Set a correct default > value for club_enrollments.date_created > >From comment 6: >""" >Can't recreate database, when creating table structure, I got: >there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT >or ON UPDATE clause > >I am on mysql 5.5.59, which is still default in jessie, more timestamp >columns are possible from mysql 5.6.5: >https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-5.html >""" > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > .../data/mysql/atomicupdate/bug_xxxxx_club_enrollments.date_created.sql | 2 +- > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_xxxxx_club_enrollments.date_created.sql b/installer/data/mysql/atomicupdate/bug_xxxxx_club_enrollments.date_created.sql >index d22f41edc5..5bf3520936 100644 >--- a/installer/data/mysql/atomicupdate/bug_xxxxx_club_enrollments.date_created.sql >+++ b/installer/data/mysql/atomicupdate/bug_xxxxx_club_enrollments.date_created.sql >@@ -1 +1 @@ >-ALTER TABLE club_enrollments MODIFY date_created timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP; >+ALTER TABLE club_enrollments MODIFY date_created timestamp NOT NULL; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 36b8120139..874bf55e08 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4039,7 +4039,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 CURRENT_TIMESTAMP, >+ date_created timestamp NULL DEFAULT NULL, > date_updated timestamp NULL DEFAULT NULL, > branchcode varchar(10) NULL DEFAULT NULL, > PRIMARY KEY (id), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 70a16099e2..056fb4f944 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -14198,7 +14198,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 CURRENT_TIMESTAMP, >+ date_created timestamp NULL DEFAULT NULL, > date_updated timestamp NULL DEFAULT NULL, > branchcode varchar(10) NULL DEFAULT NULL, > PRIMARY KEY (id), >-- >2.14.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20175
:
71464
|
71465
|
71477
|
71478