X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=installer%2Fdata%2Fmysql%2Fupdatedatabase.pl;h=d70b34477a34a99c89c9e4a48f1182b56b096068;hb=d61161a3d5fd53424150655dbe4d25749f9f24c5;hp=3da9499f3e2b6f7a347e1eec4c674be4b39d46e3;hpb=da49fc77df905ca616999cda08e9cde37d56242e;p=koha.git diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3da9499f3e..d70b34477a 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3083,6 +3083,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.01.00.118"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do(" +??? d'ici jusqu'à ???FIN des lignes ont pu être insérées/effacées INSERT INTO `permissions` (`module_bit`, `code`, `description`) VALUES (16, 'execute_reports', 'Execute SQL reports'), (16, 'create_reports', 'Create SQL Reports') @@ -3105,7 +3106,7 @@ $dbh->do(" $DBversion = "3.01.00.120"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - if (C4::Context->preference("opaclanguages") eq "fr") { + if (C4::Context->preference("opaclanguages") =~ /fr/) { $dbh->do(qq{ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','Si activé, des reservations sont automatiquement créées pour chaque lecteur de la liste de circulation d''un numéro de périodique','','YesNo'); }); @@ -3114,16 +3115,56 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','If ON the patrons on routing lists are automatically added to holds on the issue.','','YesNo'); }); } + print "Upgrade to $DBversion done (Added RoutingListAddReserves syspref)\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.01.00.121"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(qq{ + ALTER TABLE biblioitems ADD INDEX issn_idx (issn); + }); + print "Upgrade to $DBversion done (added index to ISSN)\n"; + SetVersion ($DBversion); +} + +=item + + Deal with branches + +=cut + +my $DBversion = "3.01.00.0122"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + # update branches table + # + $dbh->do("ALTER TABLE branches ADD `branchzip` varchar(25) default NULL AFTER `branchaddress3`"); + $dbh->do("ALTER TABLE branches ADD `branchcity` mediumtext AFTER `branchzip`"); + $dbh->do("ALTER TABLE branches ADD `branchcountry` text AFTER `branchcity`"); + $dbh->do("ALTER TABLE branches ADD `branchurl` mediumtext AFTER `branchemail`"); + $dbh->do("ALTER TABLE branches ADD `branchnotes` mediumtext AFTER `branchprinter`"); + print "Upgrade to $DBversion done (branches)\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.01.00.123"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(qq{ + ALTER TABLE aqbasketgroups ADD deliveryplace VARCHAR(10), deliverycomment VARCHAR(255); + }); + print "Upgrade to $DBversion done (isbd updated)\n"; SetVersion ($DBversion); } + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table =cut + sub DropAllForeignKeys { my ($table) = @_; # get the table description