From 683337afd486ed95ff911c11642b27deb53f8b34 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 21 Nov 2010 02:58:49 +0100 Subject: [PATCH] [HEAD] Bug 5423: Deleted Patrons are no longer saved in table deletedborrowers Content-Type: text/plain; charset="utf-8" --- installer/data/mysql/kohastructure.sql | 3 ++- installer/data/mysql/updatedatabase.pl | 9 +++++++++ kohaversion.pl | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 9148970..695129b 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 bf7acb6..59aa3c2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3842,6 +3842,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.XXX'; +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 =head2 DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index 86d63f9..8330459 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.003'; + our $VERSION = '3.03.00.XXX'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 1.7.1