From 1c26e98f06efeeb7ea96eb85be7ac2c65f95f6ed Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 14 Nov 2014 09:46:07 -0300 Subject: [PATCH] Bug 11401: DBRev 3.17.00.055 Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/updatedatabase.pl | 50 +++++++++++++------------- kohaversion.pl | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index ecc16a85dc..3542685cb4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8835,31 +8835,6 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } -$DBversion = "3.17.00.XXX"; -if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { - $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBEnable', '0', NULL, 'Enable communication with the Norwegian national patron database.', 'YesNo')"); - $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBEndpoint', '', NULL, 'Which NL endpoint to use.', 'Free')"); - $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBUsername', '', NULL, 'Username for communication with the Norwegian national patron database.', 'Free')"); - $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBPassword', '', NULL, 'Password for communication with the Norwegian national patron database.', 'Free')"); - $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBSearchNLAfterLocalHit','0',NULL,'Search NL if a search has already given one or more local hits?.','YesNo')"); - $dbh->do(" -CREATE TABLE borrower_sync ( - borrowersyncid int(11) NOT NULL AUTO_INCREMENT, - borrowernumber int(11) NOT NULL, - synctype varchar(32) NOT NULL, - sync tinyint(1) NOT NULL DEFAULT '0', - syncstatus varchar(10) DEFAULT NULL, - lastsync varchar(50) DEFAULT NULL, - hashed_pin varchar(64) DEFAULT NULL, - PRIMARY KEY (borrowersyncid), - KEY borrowernumber (borrowernumber), - CONSTRAINT borrower_sync_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8" -); - print "Upgrade to $DBversion done (Bug 11401 - Add support for Norwegian national library card)\n"; - SetVersion($DBversion); -} - $DBversion = "3.17.00.031"; if ( CheckVersion($DBversion) ) { $dbh->do("ALTER TABLE saved_sql CHANGE report_name report_name VARCHAR( 255 ) NOT NULL DEFAULT '' "); @@ -9505,6 +9480,31 @@ if (CheckVersion($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.17.00.055"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBEnable', '0', NULL, 'Enable communication with the Norwegian national patron database.', 'YesNo')"); + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBEndpoint', '', NULL, 'Which NL endpoint to use.', 'Free')"); + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBUsername', '', NULL, 'Username for communication with the Norwegian national patron database.', 'Free')"); + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBPassword', '', NULL, 'Password for communication with the Norwegian national patron database.', 'Free')"); + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NorwegianPatronDBSearchNLAfterLocalHit','0',NULL,'Search NL if a search has already given one or more local hits?.','YesNo')"); + $dbh->do(" +CREATE TABLE borrower_sync ( + borrowersyncid int(11) NOT NULL AUTO_INCREMENT, + borrowernumber int(11) NOT NULL, + synctype varchar(32) NOT NULL, + sync tinyint(1) NOT NULL DEFAULT '0', + syncstatus varchar(10) DEFAULT NULL, + lastsync varchar(50) DEFAULT NULL, + hashed_pin varchar(64) DEFAULT NULL, + PRIMARY KEY (borrowersyncid), + KEY borrowernumber (borrowernumber), + CONSTRAINT borrower_sync_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8" +); + print "Upgrade to $DBversion done (Bug 11401 - Add support for Norwegian national library card)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/kohaversion.pl b/kohaversion.pl index d478f694e6..bc7cbf92d4 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.054'; + our $VERSION = '3.17.00.055'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5