From 759b485158e8b6670ac1873cf201befe15aef900 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Mon, 1 Mar 2010 16:21:36 +0100 Subject: [PATCH] (bug #4287) add enrolment period update in 22 to 30 script this fix the upgrade script, to upgrade the enrolment period, that is no more in years, but in month unity. Signed-off-by: Galen Charlton --- installer/data/mysql/update22to30.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/update22to30.pl b/installer/data/mysql/update22to30.pl index cb4379b67b..c12c5bbcf3 100755 --- a/installer/data/mysql/update22to30.pl +++ b/installer/data/mysql/update22to30.pl @@ -3501,7 +3501,7 @@ my $DBversion = "3.00.00.000"; # at last, remove useless fields foreach $table ( keys %uselessfields ) { - my @fields = split /,/,$uselessfields{$table}; + my @fields = split (/,/,$uselessfields{$table}); my $fields; my $exists; foreach my $fieldtodrop (@fields) { @@ -3527,11 +3527,14 @@ my $DBversion = "3.00.00.000"; # $sth=$dbh->prepare("ALTER TABLE `aqbookfund` DROP PRIMARY KEY , ADD PRIMARY KEY ( `bookfundid` , `branchcode` ) ;"); $sth->execute; + $sth->finish; # drop extra key on borrowers.borrowernumber $dbh->do("ALTER TABLE borrowers DROP KEY borrowernumber"); - - $sth->finish; + + # update enrolmentperiod + $dbh->do("UPDATE categories SET enrolmentperiod = enrolmentperiod * 12"); + print "upgrade to Koha 3.0 done\n"; SetVersion ($DBversion); -- 2.39.5