Summary: | error during web install: 'changed_fields' can't have a default value | ||
---|---|---|---|
Product: | Koha | Reporter: | Alvaro Hernan Gomez Cardozo <agomezcardozo> |
Component: | Database | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | blocker | ||
Priority: | P5 - low | CC: | adidas.coyas, andrewanandal, cmurdock, fridolin.somers, jonathan.druart, katrin.fischer, martin.renvoize, mtj, sriramlamsal |
Version: | Main | ||
Hardware: | PC | ||
OS: | Linux | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00,19.05.05
|
|
Bug Depends on: | 23151 | ||
Bug Blocks: | 25086 | ||
Attachments: |
Bug 23579: Remove default value for MEDIUMTEXT borrower_modifications.changed_fields
Bug 23579: Remove default value for MEDIUMTEXT borrower_modifications.changed_fields Bug 23579: (RM follow-up) Fix failing tests |
Description
Alvaro Hernan Gomez Cardozo
2019-09-10 13:58:58 UTC
Just chiming in to say this affected me too, and seemed to prevent the database creation from being completed. Fixed it by the same method, removing " DEFAULT ''" from line 3398 of kohastructure.sql. This was a fresh package install of 19.05.04 on Ubuntu Server Edition 18.04.3, with mysql-server 5.7.27-0ubuntu0.18.04.1. This prevents installation of oldstable (see IRC from around this time). Upping severity. where i will find this kohastructure.sql Created attachment 94716 [details] [review] Bug 23579: Remove default value for MEDIUMTEXT borrower_modifications.changed_fields Installation under Ubuntu 18.04 is blocked: install.pl: DBD::mysql::st execute failed: BLOB, TEXT, GEOMETRY or JSON column 'changed_fields' can't have a default value at /usr/local/share/perl5/DBIx/RunSQL.pm line 273. https://dev.mysql.com/doc/refman/5.7/en/data-type-defaults.html """ The BLOB, TEXT, GEOMETRY, and JSON data types cannot be assigned a default value. """ I do not recreate using 10.3.17-MariaDB, and I would have expected our CI to catch it (maybe it does not impact MariaDB, yet). Created attachment 94718 [details] [review] Bug 23579: Remove default value for MEDIUMTEXT borrower_modifications.changed_fields Installation under Ubuntu 18.04 is blocked: install.pl: DBD::mysql::st execute failed: BLOB, TEXT, GEOMETRY or JSON column 'changed_fields' can't have a default value at /usr/local/share/perl5/DBIx/RunSQL.pm line 273. https://dev.mysql.com/doc/refman/5.7/en/data-type-defaults.html """ The BLOB, TEXT, GEOMETRY, and JSON data types cannot be assigned a default value. """ Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Trival patch to stop a blocker.. going straight for QA on this one. Must admit, I've never understood why we have "DEFAULT ''" anyway.. surely if it's "NOT NULL" then an empty string is also a bad idea.. we are expecting real data in there and as such should throw db errors if were not putting proper valid data in. Nice work! Pushed to master for 19.11.00 Created attachment 94747 [details] [review] Bug 23579: (RM follow-up) Fix failing tests Removing the default on changed_fields leads to the requirement for tests to specify data to add to said field when mocking data. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed to 19.05.x for 19.05.05 *** Bug 24005 has been marked as a duplicate of this bug. *** |