(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 <gmcharlt@gmail.com>
This commit is contained in:
parent
1da207acf6
commit
759b485158
1 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue