bug 8757 follow-up DBRev number
[koha_fer] / installer / data / mysql / updatedatabase.pl
index 4953023..a25469e 100755 (executable)
@@ -5801,12 +5801,21 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     # to preserve default behaviour as best as possible, set this new preference differently depending on whether IndependantBranches is set or not
     my $prefvalue = 'anywhere';
     if (C4::Context->preference("IndependantBranches")) { $prefvalue = 'homeorholdingbranch';}
-    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AllowReturnToBranch', '$prefvalue', 'Where an item may be returned', 'anywhere|homebranch|holdingbranch|homeorholdingbranch', 'Choice');");
+    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowReturnToBranch', '$prefvalue', 'Where an item may be returned', 'anywhere|homebranch|holdingbranch|homeorholdingbranch', 'Choice');");
 
     print "Upgrade to $DBversion done: adding AllowReturnToBranch syspref (bug 6151)";
     SetVersion($DBversion);
 }
 
+$DBversion = "3.09.00.048";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("ALTER TABLE authorised_values MODIFY lib varchar(200)");
+    $dbh->do("ALTER TABLE authorised_values MODIFY lib_opac varchar(200)");
+
+    print "Upgrade to $DBversion done (Raise the length of Authorised Values descriptions)\n";
+    SetVersion($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)