summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
32aac9e)
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 <henridamien.laurent@biblibre.com>
# at last, remove useless fields
foreach $table ( keys %uselessfields ) {
# 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) {
my $fields;
my $exists;
foreach my $fieldtodrop (@fields) {
#
$sth=$dbh->prepare("ALTER TABLE `aqbookfund` DROP PRIMARY KEY , ADD PRIMARY KEY ( `bookfundid` , `branchcode` ) ;");
$sth->execute;
#
$sth=$dbh->prepare("ALTER TABLE `aqbookfund` DROP PRIMARY KEY , ADD PRIMARY KEY ( `bookfundid` , `branchcode` ) ;");
$sth->execute;
# drop extra key on borrowers.borrowernumber
$dbh->do("ALTER TABLE borrowers DROP KEY borrowernumber");
# drop extra key on borrowers.borrowernumber
$dbh->do("ALTER TABLE borrowers DROP KEY borrowernumber");
+
+ # update enrolmentperiod
+ $dbh->do("UPDATE categories SET enrolmentperiod = enrolmentperiod * 12");
+
print "upgrade to Koha 3.0 done\n";
SetVersion ($DBversion);
print "upgrade to Koha 3.0 done\n";
SetVersion ($DBversion);