X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=installer%2Fdata%2Fmysql%2Fupdatedatabase.pl;h=10c3451fbeefddf5d76e602bc14515e467a5af59;hb=58ee841a73ea02d38d465e8c4663ab7bf509a62e;hp=dc7656b56fd8517d6447c376c9f7b15a690649cf;hpb=c03a3a0d923f4bdd1c231d774c729ced2885cebf;p=koha-ffzg.git diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index dc7656b56f..10c3451fbe 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2581,6 +2581,100 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (bug 1934: Add OPACSearchForTitleIn syspref)\n"; } +$DBversion = '3.01.00.051'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE systempreferences SET explanation='Fine limit above which user cannot renew books via OPAC' WHERE variable='OPACFineNoRenewals';"); + $dbh->do("UPDATE systempreferences SET explanation='If set to ON, a clear screen button will appear on the circulation page.' WHERE variable='DisplayClearScreenButton';"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (fixed typos in new sysprefs)\n"; +} + +$DBversion = '3.01.00.052'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do('ALTER TABLE deleteditems ADD COLUMN permanent_location VARCHAR(80) DEFAULT NULL AFTER location'); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (bug 3481: add permanent_location column to deleteditems)\n"; +} + +$DBversion = '3.01.00.053'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + my $upgrade_script = C4::Context->config("intranetdir") . "/installer/data/mysql/labels_upgrade.pl"; + system("perl $upgrade_script"); + print "Upgrade to $DBversion done (Migrated labels tables and data to new schema.) NOTE: All existing label batches have been assigned to the first branch in the list of branches. This is ONLY true of migrated label batches.\n"; + SetVersion ($DBversion); +} + +$DBversion = '3.01.00.054'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE borrowers ADD `B_address2` text AFTER B_address"); + $dbh->do("ALTER TABLE borrowers ADD `altcontactcountry` text AFTER altcontactzipcode"); + $dbh->do("ALTER TABLE deletedborrowers ADD `B_address2` text AFTER B_address"); + $dbh->do("ALTER TABLE deletedborrowers ADD `altcontactcountry` text AFTER altcontactzipcode"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (bug 1600, bug 3454: add altcontactcountry and B_address2 to borrowers and deletedborrowers)\n"; +} + +$DBversion = '3.01.00.055'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(qq|UPDATE systempreferences set explanation='Enter the HTML that will appear in the ''Search for this title in'' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable ''More Searches'' menu.', value='
  • Other Libraries (WorldCat)
  • \n
  • Other Databases (Google Scholar)
  • \n
  • Online Stores (Bookfinder.com)
  • ' WHERE variable='OPACSearchForTitleIn'|); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (changed OPACSearchForTitleIn per requests in bug 1934)\n"; +} + +$DBversion = '3.01.00.056'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is disabled.','','YesNo');"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (Bug 1172 : Add OPACPatronDetails syspref)\n"; +} + +$DBversion = '3.01.00.057'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is disabled.','','YesNo');"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (Bug 2576 : Add OPACFinesTab syspref)\n"; +} + +$DBversion = '3.01.00.058'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `language_subtag_registry` ADD `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY;"); + $dbh->do("ALTER TABLE `language_rfc4646_to_iso639` ADD `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY;"); + $dbh->do("ALTER TABLE `language_descriptions` ADD `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY;"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (Added primary keys to language tables)\n"; +} + +$DBversion = '3.01.00.059'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo')"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (added DisplayOPACiconsXSLT sysprefs)\n"; +} + +$DBversion = '3.01.00.060'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');"); + $dbh->do('DROP TABLE IF EXISTS messages'); + $dbh->do("CREATE TABLE messages ( `message_id` int(11) NOT NULL auto_increment, + `borrowernumber` int(11) NOT NULL, + `branchcode` varchar(4) default NULL, + `message_type` varchar(1) NOT NULL, + `message` text NOT NULL, + `message_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`message_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8"); + + print "Upgrade to $DBversion done ( Added AllowAllMessageDeletion syspref and messages table )\n"; + SetVersion ($DBversion); +} + +$DBversion = '3.01.00.061'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'If ON, displays patron image when a patron uses web-based self-checkout', '', 'YesNo')"); + print "Upgrade to $DBversion done ( Added ShowPatronImageInWebBasedSelfCheck system preference )\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table