This bug is a continuation of bug 20144
Created attachment 71464 [details] [review] 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>
Created attachment 71465 [details] [review] 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>
Not sure about this one. Shouldn't date_created be set to "now" in Koha::Club::Enrollment->store ?
It is set in svc/club/enroll 50 date_enrolled => \'NOW()', 51 date_created => \'NOW()', Which it weird and wrong. I considered it as out of the scope if there is no regression.
Created attachment 71477 [details] [review] 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>
Created attachment 71478 [details] [review] 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> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Pushed to master for 18.05, thanks to everybody involved!
Maybe we should consider backporting this or at least fixing kohastructure in the other branches. We ran into the problem updating an instance to 17.11 today.
Also it came up on the mailing list a few times now.
(In reply to Katrin Fischer from comment #8) > Maybe we should consider backporting this or at least fixing kohastructure > in the other branches. We ran into the problem updating an instance to 17.11 > today. Same for us, we have patched our 17.11 with this for our upgrades.
Pushed to 17.11.x for 17.11.08. The db update can be run even if already applied.