@@ -, +, @@ --- installer/data/mysql/kohastructure.sql | 10 ++++++---- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -2007,21 +2007,23 @@ CREATE TABLE `virtualshelfcontents` ( -- information about the titles in a list DROP TABLE IF EXISTS `z3950servers`; CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets used in cataloging - `host` varchar(255) default NULL, -- target's host name + `host` varchar(255) NOT NULL, -- target's host name `port` int(11) default NULL, -- port number used to connect to target `db` varchar(255) default NULL, -- target's database name `userid` varchar(255) default NULL, -- username needed to log in to target `password` varchar(255) default NULL, -- password needed to log in to target - `name` mediumtext, -- name given to the target by the library + `name` mediumtext NOT NULL, -- name given to the target by the library `id` int(11) NOT NULL auto_increment, -- unique identifier assigned by Koha `checked` smallint(6) default NULL, -- whether this target is checked by default (1 for yes, 0 for no) `rank` int(11) default NULL, -- where this target appears in the list of targets - `syntax` varchar(80) default NULL, -- marc format provided by this target + `syntax` varchar(80) NOT NULL, -- marc format provided by this target `icon` text, -- unused in Koha `position` enum('primary','secondary','') NOT NULL default 'primary', `type` enum('zed','opensearch') NOT NULL default 'zed', - `encoding` text default NULL, -- characters encoding provided by this target + `encoding` text NOT NULL, -- characters encoding provided by this target `description` text NOT NULL, -- unused in Koha + `srufields` text, -- list for matching Koha search fields with sru indexes + `add_xslt` varchar(255), -- name of optional xslt transformation to apply PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -4578,6 +4578,18 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.06.XX.XXX"; #FIXME +if(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) --