From 74cb2f666e3bf1478dca979e2aae68a36a2acd97 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 8 Apr 2009 15:52:05 -0500 Subject: [PATCH] bug 3099: fix copying patron info to deletedborrowers (DB rev 018) Fixes the following problem: When deleting a patron record via the intranet or the cleanborrowers tool, patron records are deleted but are not copied to deletedborrowers. C4::Members::MoveMemberToDeleted() fails with the following error: deletemem.pl: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at C4/Members.pm line 1672., Signed-off-by: Galen Charlton --- installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/updatedatabase.pl | 9 ++++++++- kohaversion.pl | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index d55e95c522..27a587522b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -898,6 +898,7 @@ CREATE TABLE `deletedborrowers` ( `altcontactaddress3` varchar(255) default NULL, `altcontactzipcode` varchar(50) default NULL, `altcontactphone` varchar(50) default NULL, + `smsalertnumber` varchar(50) default 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 2b68f84e7f..5651a35152 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2292,7 +2292,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { 'OPACSerialIssueDisplayCount', '3', '', 'Number of serial issues to display per subscription in the OPAC', 'Integer' );"); - print "Upgrade to $DBversion done ( Updated table for Branch Transfer Limits)\n"; + print "Upgrade to $DBversion done ( Updated table for Serials Display)\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.01.00.018"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE deletedborrowers ADD `smsalertnumber` varchar(50) default NULL"); + print "Upgrade to $DBversion done (added deletedborrowers.smsalertnumber, missed in 3.00.00.091)\n"; SetVersion ($DBversion); } diff --git a/kohaversion.pl b/kohaversion.pl index 8cc018f247..c9d8661bd4 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.017'; + our $VERSION = '3.01.00.018'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5