From d9d4b54065a48687a36f4104e3334639e589b569 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 7 Aug 2019 20:08:22 -0500 Subject: [PATCH] Bug 23309: Update DB Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize (cherry picked from commit 0a0a8d874d9a46b0c53b9ce4691e36f5dc04e68e) Signed-off-by: Fridolin Somers (cherry picked from commit aaa522c685bf40664561bb928d2c88f630f256d1) Signed-off-by: Lucas Gass --- installer/data/mysql/atomicupdate/bug_23309.perl | 10 ++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_23309.perl diff --git a/installer/data/mysql/atomicupdate/bug_23309.perl b/installer/data/mysql/atomicupdate/bug_23309.perl new file mode 100644 index 0000000000..9db4d07fe4 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23309.perl @@ -0,0 +1,10 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + $dbh->do(q| + ALTER TABLE marc_subfield_structure CHANGE COLUMN hidden hidden TINYINT(1) DEFAULT 8 NOT NULL; + |); + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23309 - Can't add new subfields to bibliographic frameworks in strict mode)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 5f9be5811e..2dc5d4e71a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1148,7 +1148,7 @@ CREATE TABLE `marc_subfield_structure` ( `authtypecode` varchar(20) default NULL, `value_builder` varchar(80) default NULL, `isurl` tinyint(1) default NULL, - `hidden` tinyint(1) default NULL, + `hidden` tinyint(1) NOT NULL default 8, `frameworkcode` varchar(4) NOT NULL default '', `seealso` varchar(1100) default NULL, `link` varchar(80) default NULL, -- 2.11.4.GIT