From b22c1a1e100a3f3a86cc635e0916ca8c61955a37 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Mon, 1 Mar 2010 16:20:48 +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: Henri-Damien LAURENT --- 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 435d767f86..d4707437d2 100755 --- a/installer/data/mysql/update22to30.pl +++ b/installer/data/mysql/update22to30.pl @@ -3500,7 +3500,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) { @@ -3526,11 +3526,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