Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm
[koha-ffzg.git] / installer / data / mysql / updatedatabase.pl
index b599061..3739f38 100755 (executable)
@@ -8770,14 +8770,12 @@ if(CheckVersion($DBversion)) {
     SetVersion($DBversion);
 }
 
-
 $DBversion = '3.17.00.025';
 if ( CheckVersion($DBversion) ) {
     $dbh->do(qq{
         INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('StatisticsFields','location|itype|ccode','Define fields (from the items table) used for statistics members',NULL,'Free')
     });
     print "Upgrade to $DBversion done (Bug 12728: Checked syspref StatisticsFields)\n";
-    SetVersion($DBversion);
 }
 
 $DBversion = "3.17.00.026";
@@ -8791,6 +8789,135 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.17.00.027";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        DELETE FROM systempreferences WHERE variable = 'SearchEngine'
+    });
+    print "Upgrade to $DBversion done (Bug 12538 - Remove SearchEngine syspref)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.17.00.028";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        INSERT INTO systempreferences (variable,value) VALUES('OpacCustomSearch','');
+    });
+    print "Upgrade to $DBversion done (Bug 12296 - search box replaceable with a system preference)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.17.00.029";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("ALTER TABLE  `items` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
+    $dbh->do("ALTER TABLE  `deleteditems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
+    $dbh->do("ALTER TABLE  `biblioitems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
+    $dbh->do("ALTER TABLE  `deletedbiblioitems` CHANGE  `cn_sort`  `cn_sort` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL");
+    print "Upgrade to $DBversion done (Bug 12424 - ddc sorting of call numbers truncates long Cutter parts)\n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.17.00.030";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(
+        q{
+       INSERT INTO systempreferences (variable, value, options, explanation, type )
+       VALUES
+        ('UsageStatsCountry', '', NULL, 'The country where your library is located, to be shown on the Hea Koha community website', 'YesNo'),
+        ('UsageStatsID', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.',  'Free'),
+        ('UsageStatsLastUpdateTime', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.', 'Free'),
+        ('UsageStatsLibraryName', '', NULL, 'The library name to be shown on Hea Koha community website', 'Free'),
+        ('UsageStatsLibraryType', 'public', 'public|university', 'The library type to be shown on the Hea Koha community website', 'Choice'),
+        ('UsageStatsLibraryUrl', '', NULL, 'The library URL to be shown on Hea Koha community website', 'Free'),
+        ('UsageStats', 0, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo')
+    });
+    print "Upgrade to $DBversion done (Bug 11926: Add UsageStats systempreferences (HEA))\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.17.00.031";
+if ( CheckVersion($DBversion) ) {
+   $dbh->do("ALTER TABLE saved_sql CHANGE report_name report_name VARCHAR( 255 ) NOT NULL DEFAULT '' ");
+   print "Upgrade to $DBversion done (Bug 2969: Report Name should be mandatory for saved reports)\n";
+   SetVersion ($DBversion);
+}
+
+$DBversion = "3.17.00.032";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(
+"INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ReplytoDefault',  '',  NULL,  'The default email address to be set as replyto.',  'Free')"
+    );
+    $dbh->do(
+"INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ReturnpathDefault',  '',  NULL,  'The default email address to be set as return-path',  'Free')"
+    );
+    $dbh->do("ALTER TABLE branches ADD branchreplyto mediumtext AFTER branchemail");
+    $dbh->do("ALTER TABLE branches ADD branchreturnpath mediumtext AFTER branchreplyto");
+    print "Upgrade to $DBversion done (Bug 9530: Adding replyto and returnpath addresses.)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.17.00.033";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type)
+        VALUES('FacetMaxCount', '20','Specify the max facet count for each category',NULL,'Integer')
+    });
+    print "Upgrade to $DBversion done (Bug 13088 - Allow the user to specify a max amount of facets to show)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.17.00.034";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q|
+        ALTER TABLE aqorders DROP COLUMN cancelledby;
+    |);
+
+    print "Upgrade to $DBversion done (Bug 11007 - DROP column aqorders.cancelledby)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.17.00.035";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q|
+        ALTER TABLE serial ADD COLUMN claims_count INT(11) DEFAULT 0 after claimdate
+    |);
+    $dbh->do(q|
+        UPDATE serial
+        SET claims_count = 1
+        WHERE claimdate IS NOT NULL
+    |);
+    print "Upgrade to $DBversion done (Bug 5342: Add claims_count field in serial table)\n";
+    SetVersion($DBversion);
+}
+
+$DBversion = "3.17.00.XXX";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("DELETE FROM systempreferences WHERE variable='OpacShowLibrariesPulldownMobile'");
+    print "Upgrade to $DBversion done ( Bug 12513 - PROG/CCSR deprecation: Remove OpacShowLibrariesPulldownMobile system preference )\n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.17.00.XXX";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("DELETE FROM systempreferences WHERE variable='OpacMainUserBlockMobile'");
+    print "Upgrade to $DBversion done ( Bug 12246 - PROG/CCSR deprecation: Remove OpacMainUserBlockMobile system preference )\n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.17.00.XXX";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("DELETE FROM systempreferences WHERE variable='OPACMobileUserCSS'");
+    print "Upgrade to $DBversion done ( Bug 12245 - PROG/CCSR deprecation: Remove OPACMobileUserCSS system preference )\n";
+    SetVersion ($DBversion);
+}
+
+$DBversion = "3.17.00.XXX";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do("INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES
+    ('OPACFallback', 'prog', 'bootstrap|prog', 'Define the fallback theme for the OPAC interface.', 'Themes')");
+    print "Upgrade to $DBversion done (Bug 12539 - PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm)\n";
+    SetVersion ($DBversion);
+}
 
 =head1 FUNCTIONS