projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 7144 followup DBrev number
[koha.git]
/
installer
/
data
/
mysql
/
update22to30.pl
diff --git
a/installer/data/mysql/update22to30.pl
b/installer/data/mysql/update22to30.pl
index
cb4379b
..
76bb3c2
100755
(executable)
--- a/
installer/data/mysql/update22to30.pl
+++ b/
installer/data/mysql/update22to30.pl
@@
-4,7
+4,7
@@
# Database Updater
# This script checks for required updates to the database.
# Database Updater
# This script checks for required updates to the database.
-# Part of the Koha Library Software www.koha.org
+# Part of the Koha Library Software www.koha
-community
.org
# Licensed under the GPL.
# Bugs/ToDo:
# Licensed under the GPL.
# Bugs/ToDo:
@@
-3501,7
+3501,7
@@
my $DBversion = "3.00.00.000";
# 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) {
@@
-3527,20
+3527,23
@@
my $DBversion = "3.00.00.000";
#
$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;
+ $sth->finish;
# 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");
-
- $sth->finish;
+
+ # 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);
-
-=item GetDefaultClause
+=head1 GetDefaultClause
Generate a default clause (for an ALTER TABLE command)
=cut
Generate a default clause (for an ALTER TABLE command)
=cut
+
sub GetDefaultClause {
my $default = shift;
sub GetDefaultClause {
my $default = shift;
@@
-3551,11
+3554,11
@@
sub GetDefaultClause {
return "default " . $dbh->quote($default);
}
return "default " . $dbh->quote($default);
}
-=item TransformToNum
+=head1 TransformToNum
+
+Transform the Koha version from a 4 parts string
+to a number, with just 1.
- Transform the Koha version from a 4 parts string
- to a number, with just 1 .
-
=cut
sub TransformToNum {
=cut
sub TransformToNum {
@@
-3565,8
+3568,10
@@
sub TransformToNum {
return $version;
}
return $version;
}
-=item SetVersion
- set the DBversion in the systempreferences
+=head1 SetVersion
+
+set the DBversion in the systempreferences
+
=cut
sub SetVersion {
=cut
sub SetVersion {