From 902b05d5bf4e9e655000b86a34700152582fcba3 Mon Sep 17 00:00:00 2001 From: Charles Farmer Date: Wed, 21 Feb 2018 15:12:42 -0500 Subject: [PATCH] Bug 11297: Add atomicupdate patch and modify kohastructure.sql Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- .../atomicupdate/Bug11297_z3950servers_attributes.perl | 9 +++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 10 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/Bug11297_z3950servers_attributes.perl diff --git a/installer/data/mysql/atomicupdate/Bug11297_z3950servers_attributes.perl b/installer/data/mysql/atomicupdate/Bug11297_z3950servers_attributes.perl new file mode 100644 index 0000000000..2250a26cff --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug11297_z3950servers_attributes.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + if( !column_exists( 'z3950servers', 'attributes' ) ) { + $dbh->do( "ALTER TABLE z3950servers ADD COLUMN attributes VARCHAR(255) after add_xslt" ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 11297 - Add support for custom PQF attributes for Z39.50 server searches)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index f6da9ee1d3..d0f006e21f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2238,6 +2238,7 @@ CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets u `sru_options` varchar(255) default NULL, -- options like sru=get, sru_version=1.1; will be passed to the server via ZOOM `sru_fields` LONGTEXT default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes `add_xslt` LONGTEXT default NULL, -- zero or more paths to XSLT files to be processed on the search results + `attributes` VARCHAR(255) default NULL, -- additional attributes passed to PQF queries PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- 2.17.1