Bug 11334: add ability to control which library fields are used for facets
[koha_fer] / installer / data / mysql / updatedatabase.pl
index e033a92..8b68faf 100755 (executable)
@@ -8202,10 +8202,10 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
-$DBversion = "3.15.00.XXX";
+$DBversion = "3.15.00.037";
 if(CheckVersion($DBversion)) {
     $dbh->do(q{
-        ALTER TABLE itemtypes ADD sip_media_type VARCHAR( 3 ) DEFAULT NULL
+        ALTER TABLE itemtypes ADD sip_media_type VARCHAR( 3 ) DEFAULT NULL AFTER checkinmsgtype
     });
     $dbh->do(q{
         INSERT INTO authorised_values (category, authorised_value, lib) VALUES
@@ -8217,14 +8217,32 @@ if(CheckVersion($DBversion)) {
          ('SIP_MEDIA_TYPE', '005', 'Video tape'),
          ('SIP_MEDIA_TYPE', '006', 'CD/CDROM'),
          ('SIP_MEDIA_TYPE', '007', 'Diskette'),
-         ('SIP_MEDIA_TYPE', '008', 'Book with deskette'),
-         ('SIP_MEDIA_TYPE', '009', 'Book with cd'),
+         ('SIP_MEDIA_TYPE', '008', 'Book with diskette'),
+         ('SIP_MEDIA_TYPE', '009', 'Book with CD'),
          ('SIP_MEDIA_TYPE', '010', 'Book with audio tape')
     });
     print "Upgrade to $DBversion done (Bug 11351 - Add support for SIP2 media type)\n";
     SetVersion($DBversion);
 }
 
+$DBversion = '3.15.00.XXX';
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        INSERT INTO  systempreferences (
+            variable,
+            value,
+            options,
+            explanation,
+            type
+            )
+        VALUES (
+            'DisplayLibraryFacets',  'holdingbranch',  'home|holding|both',  'Defines which library facets to display.',  'Choice'
+        );
+    });
+    print "Upgrade to $DBversion done (Bug 11334 - Add facet for home library)\n";
+    SetVersion ($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)