From 88521dda625feb108a1f6734a700e3325abd0890 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 1 Sep 2014 10:11:34 -0300 Subject: [PATCH] Bug 6536: DBRev 3.17.00.017 Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/updatedatabase.pl | 56 +++++++++++++------------- kohaversion.pl | 2 +- 2 files changed, 28 insertions(+), 30 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index fac981a003..094576ba0a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8577,35 +8577,6 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } - -$DBversion = "3.17.00.XXX"; -if ( CheckVersion($DBversion) ) { - # Correct invalid recordtypes (should be very exceptional) - $dbh->do(q{ - UPDATE z3950servers set recordtype='biblio' WHERE recordtype NOT IN ('authority','biblio') - }); - # Correct invalid server types (should also be very exceptional) - $dbh->do(q{ - UPDATE z3950servers set type='zed' WHERE type <> 'zed' - }); - # Adjust table - $dbh->do(q{ - ALTER TABLE z3950servers - DROP COLUMN icon, - DROP COLUMN description, - DROP COLUMN position, - MODIFY COLUMN id int NOT NULL AUTO_INCREMENT FIRST, - MODIFY COLUMN recordtype enum('authority','biblio') NOT NULL DEFAULT 'biblio', - CHANGE COLUMN name servername mediumtext NOT NULL, - CHANGE COLUMN type servertype enum('zed','sru') NOT NULL DEFAULT 'zed', - ADD COLUMN sru_options varchar(255) default NULL, - ADD COLUMN sru_fields mediumtext default NULL, - ADD COLUMN add_xslt mediumtext default NULL - }); - print "Upgrade to $DBversion done (Bug 6536: Z3950 improvements)\n"; - SetVersion ($DBversion); -} - $DBversion = "3.17.00.011"; if ( CheckVersion($DBversion) ) { $dbh->do("INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'hr', 'language', 'Croatian','2014-07-24' )"); @@ -8698,6 +8669,33 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.17.00.017"; +if ( CheckVersion($DBversion) ) { + # Correct invalid recordtypes (should be very exceptional) + $dbh->do(q{ + UPDATE z3950servers set recordtype='biblio' WHERE recordtype NOT IN ('authority','biblio') + }); + # Correct invalid server types (should also be very exceptional) + $dbh->do(q{ + UPDATE z3950servers set type='zed' WHERE type <> 'zed' + }); + # Adjust table + $dbh->do(q{ + ALTER TABLE z3950servers + DROP COLUMN icon, + DROP COLUMN description, + DROP COLUMN position, + MODIFY COLUMN id int NOT NULL AUTO_INCREMENT FIRST, + MODIFY COLUMN recordtype enum('authority','biblio') NOT NULL DEFAULT 'biblio', + CHANGE COLUMN name servername mediumtext NOT NULL, + CHANGE COLUMN type servertype enum('zed','sru') NOT NULL DEFAULT 'zed', + ADD COLUMN sru_options varchar(255) default NULL, + ADD COLUMN sru_fields mediumtext default NULL, + ADD COLUMN add_xslt mediumtext default NULL + }); + print "Upgrade to $DBversion done (Bug 6536: Z3950 improvements)\n"; + SetVersion ($DBversion); +} =head1 FUNCTIONS diff --git a/kohaversion.pl b/kohaversion.pl index 7e2263218a..1f69dcb4d6 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.17.00.016'; + our $VERSION = '3.17.00.017'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5