From c959e60497fc556711b48a9883c902516080b0c3 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 30 Jun 2011 09:34:23 +0200 Subject: [PATCH] 6536: Z3950 Enhancements (DB Revision) Content-Type: text/plain; charset="utf-8" This patch contains db revision for Z3950 enhancements: SRU search targets, MARC conversion and additional XSLT processing. August 11, 2011: Rebased. Removed changes for different XXX handling (see Bugzilla 6700). --- installer/data/mysql/kohastructure.sql | 10 ++++++---- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e9edf25..ad416c1 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1987,21 +1987,23 @@ CREATE TABLE `virtualshelfcontents` ( DROP TABLE IF EXISTS `z3950servers`; CREATE TABLE `z3950servers` ( - `host` varchar(255) default NULL, + `host` varchar(255) NOT NULL, `port` int(11) default NULL, `db` varchar(255) default NULL, `userid` varchar(255) default NULL, `password` varchar(255) default NULL, - `name` mediumtext, + `name` mediumtext NOT NULL, `id` int(11) NOT NULL auto_increment, `checked` smallint(6) default NULL, `rank` int(11) default NULL, - `syntax` varchar(80) default NULL, + `syntax` varchar(80) NOT NULL, `icon` text, `position` enum('primary','secondary','') NOT NULL default 'primary', `type` enum('zed','opensearch') NOT NULL default 'zed', - `encoding` text default NULL, + `encoding` text NOT NULL, `description` text NOT NULL, + `srufields` text, + `add_xslt` varchar(255), PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 720bd8c..c50da0c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4399,6 +4399,18 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; #FIXME: RM, please remove 1 in the if and the # before SetVersion +if (1||C4::Context->preference("Version") lt TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `host` varchar(255) NOT NULL;"); + $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `name` mediumtext NOT NULL;"); + $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `syntax` varchar(80) NOT NULL;"); + $dbh->do("ALTER TABLE z3950servers MODIFY COLUMN `encoding` text NOT NULL;"); + $dbh->do("ALTER TABLE z3950servers ADD COLUMN `srufields` text;"); + $dbh->do("ALTER TABLE z3950servers ADD COLUMN `add_xslt` varchar(255);"); + print "Upgrade to $DBversion done (Bug 6536: Z3950 enhancements)\n"; + #SetVersion ($DBversion); #FIXME +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 1.6.0.6