SetVersion ($DBversion);
}
+$DBversion = "3.01.00.126";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ILS-DI','0','Enable ILS-DI services. See http://your.opac.name/cgi-bin/koha/ilsdi.pl for online documentation.','','YesNo')");
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ILS-DI:AuthorizedIPs','127.0.0.1','A comma separated list of IP addresses authorized to access the web services.','','free')");
+
+ print "Upgrade to $DBversion done (Adding ILS-DI updates and ILS-DI:Authorized_IPs)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = '3.01.00.127';
+if (C4::Context->preference('Version') < TransformToNum($DBversion)){
+ $dbh->do("ALTER TABLE messages CHANGE branchcode branchcode varchar(10);");
+ print "Upgrade to $DBversion done (bug 4190: messages in patron account did not work with branchcodes > 4)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = '3.01.00.128';
+if (C4::Context->preference('Version') < TransformToNum($DBversion)){
+ $dbh->do('CREATE INDEX budget_id ON aqorders (budget_id );');
+ print "Upgrade to $DBversion done (bug 4331: index orders by budget_id)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.01.00.129";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("UPDATE `permissions` SET `code` = 'items_batchdel' WHERE `permissions`.`module_bit` =13 AND `permissions`.`code` = 'batchdel' LIMIT 1 ;");
+ $dbh->do("UPDATE `permissions` SET `code` = 'items_batchmod' WHERE `permissions`.`module_bit` =13 AND `permissions`.`code` = 'batchmod' LIMIT 1 ;");
+ print "Upgrade done (Change permissions names for item batch modification / deletion)\n";
+
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.01.00.130";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("UPDATE reserves SET expirationdate = NULL WHERE expirationdate = '0000-00-00'");
+ print "Upgrade done (change reserves.expirationdate values of 0000-00-00 to NULL (bug 1532)";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.01.00.131";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do(q{
+INSERT IGNORE INTO message_transport_types (message_transport_type) VALUES ('print'),('feed');
+ });
+ print "Upgrade to $DBversion done (adding print and feed message transport types)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.01.00.132";
+#3.02.00.023
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do(q{
+ ALTER TABLE language_descriptions ADD INDEX LANG (subtag, type, lang);
+ });
+ print "Upgrade to $DBversion done (Adding index to language_descriptions table)\n";
+ SetVersion ($DBversion);
+}
+
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table