DB UPDATE : Patron category code was defined incorrectly in overduerules (notice/status triggers) and deletedborrowers.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Ryan Higgins 2008-07-22 20:52:16 -05:00 committed by Joshua Ferraro
parent 8f55696a4d
commit 0ed39b89cd
3 changed files with 11 additions and 3 deletions

View file

@ -842,7 +842,7 @@ CREATE TABLE `deletedborrowers` (
`B_phone` mediumtext,
`dateofbirth` date default NULL,
`branchcode` varchar(10) NOT NULL default '',
`categorycode` varchar(2) default NULL,
`categorycode` varchar(10) default NULL,
`dateenrolled` date default NULL,
`dateexpiry` date default NULL,
`gonenoaddress` tinyint(1) default NULL,
@ -1508,7 +1508,7 @@ CREATE TABLE `opac_news` (
DROP TABLE IF EXISTS `overduerules`;
CREATE TABLE `overduerules` (
`branchcode` varchar(10) NOT NULL default '',
`categorycode` varchar(2) NOT NULL default '',
`categorycode` varchar(10) NOT NULL default '',
`delay1` int(4) default 0,
`letter1` varchar(20) default NULL,
`debarred1` varchar(1) default 0,

View file

@ -1871,6 +1871,14 @@ if ( C4::Context->preference('Version') < TransformToNum($DBversion) ) {
SetVersion($DBversion);
}
$DBversion = '3.00.00.101';
if ( C4::Context->preference('Version') < TransformToNum($DBversion) ) {
$dbh->do('ALTER TABLE `overduerules` CHANGE `categorycode` `categorycode` VARCHAR(10) NOT NULL');
$dbh->do('ALTER TABLE `deletedborrowers` CHANGE `categorycode` `categorycode` VARCHAR(10) NOT NULL');
print "Upgrade to $DBversion done (Updating columnd definitions for patron category codes in notice/statsu triggers and deletedborrowers tables.\n";
SetVersion($DBversion);
}
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table

View file

@ -10,7 +10,7 @@
use strict;
sub kohaversion {
our $VERSION = '3.00.00.100';
our $VERSION = '3.00.00.101';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install