SetVersion($DBversion);
}
-
-
$DBversion = "3.09.00.050";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE authorised_values MODIFY category varchar(16) NOT NULL DEFAULT '';");
$DBversion = "3.11.00.100";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
print "Upgrade to $DBversion done (3.12-alpha release)\n";
- SetVersion ($DBversion);
+ SetVersion ($DBversion);
}
$DBversion = "3.11.00.101";
SetVersion ($DBversion);
}
+$DBversion = "3.11.00.110";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do("ALTER TABLE pending_offline_operations CHANGE barcode barcode VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
+ $dbh->do("ALTER TABLE pending_offline_operations ADD amount DECIMAL( 28, 6 ) NULL DEFAULT NULL");
+ print "Upgrade to $DBversion done (Bug 8220 - Allow koc uploads to go to process queue)\n";
+ SetVersion ($DBversion);
+}
+$DBversion = "3.11.00.111";
+if ( CheckVersion($DBversion) ) {
+ my $sth = $dbh->prepare("
+ SELECT module, code, branchcode, content
+ FROM letter
+ WHERE content LIKE '%<fine>%'
+ ");
+ $sth->execute;
+ my $sth_update = $dbh->prepare("UPDATE letter SET content = ? WHERE module = ? AND code = ? AND branchcode = ?");
+ while(my $row = $sth->fetchrow_hashref){
+ $row->{content} =~ s/<fine>\w+<\/fine>/<<items.fine>>/;
+ $sth_update->execute($row->{content}, $row->{module}, $row->{code}, $row->{branchcode});
+ }
+ print "Upgrade to $DBversion done (use new <<items.fine>> syntax in notices)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.11.00.112";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do(qq{
+ ALTER TABLE issuingrules ADD COLUMN renewalperiod int(4) DEFAULT NULL AFTER renewalsallowed
+ });
+ $dbh->do(qq{
+ UPDATE issuingrules SET renewalperiod = issuelength
+ });
+ print "Upgrade to $DBversion done (Bug 8365: Add colum issuingrules.renewalperiod)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.11.00.113";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do(q{
+ ALTER TABLE branchcategories ADD show_in_pulldown BOOLEAN NOT NULL DEFAULT '0',
+ ADD INDEX ( show_in_pulldown )
+ });
+ print "Upgrade to $DBversion done (Bug 9257 - Add groups to normal search pulldown)\n";
+ SetVersion ($DBversion);
+}
=head1 FUNCTIONS