From 289eb6caa5897fecfcc841b13a5425da303c7dd4 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 6 Dec 2010 08:28:38 +0100 Subject: [PATCH] Bug 5423: Deleted Patrons are no longer saved in table deletedborrowers Tested with HEAD > Should also apply to 3.2.x ( Not tested with 3.2.x) Signed-off-by: Koustubha Kale Signed-off-by: Chris Cormack --- installer/data/mysql/kohastructure.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 8 ++++++++ kohaversion.pl | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 9148970ca8..695129b0a2 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -642,7 +642,7 @@ CREATE TABLE `deletedbiblioitems` ( DROP TABLE IF EXISTS `deletedborrowers`; CREATE TABLE `deletedborrowers` ( `borrowernumber` int(11) NOT NULL default 0, - `cardnumber` varchar(9) NOT NULL default '', + `cardnumber` varchar(16) NOT NULL default '', `surname` mediumtext NOT NULL, `firstname` text, `title` mediumtext, @@ -703,6 +703,7 @@ CREATE TABLE `deletedborrowers` ( `altcontactcountry` text default NULL, `altcontactphone` varchar(50) default NULL, `smsalertnumber` varchar(50) default NULL, + `privacy` integer(11) DEFAULT '1' NOT NULL, KEY `borrowernumber` (`borrowernumber`), KEY `cardnumber` (`cardnumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7eea7005e8..80dca66203 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3883,6 +3883,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.006'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE deletedborrowers ADD `privacy` int(11) AFTER smsalertnumber;"); + $dbh->do("ALTER TABLE deletedborrowers CHANGE `cardnumber` `cardnumber` varchar(16);"); + print "Upgrade to $DBversion done (Fix differences between borrowers and deletedborrowers)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS diff --git a/kohaversion.pl b/kohaversion.pl index ec6c2b35e3..29075d80a2 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.03.00.005'; + our $VERSION = '3.03.00.006'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5