Bug 10012: remove last traces of NoZebra
authorGalen Charlton <gmc@esilibrary.com>
Fri, 21 Feb 2014 18:14:05 +0000 (18:14 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 12 Mar 2014 14:07:07 +0000 (14:07 +0000)
This patch removes the last traces of NoZebra:

[1] The DBIC schema class for the nozebra table
[2] References to the NoZebra and NoZebraIndexes sysprefs
    in the Italian SQL scripts.
[3] Deleting the NoZebraIndexes syspref if it's still present.

To test:

[1] Verify that after applying the patch and running the DB upgrade,
    that "NoZebraIndexes" is no longer to be found in the
    systempreferences table.
[2] Verify that "nozebra" is not referenced anywhere in the source
    code except for the database update scripts.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Koha/Schema/Result/Nozebra.pm [deleted file]
installer/data/mysql/it-IT/necessari/system_preferences.sql
installer/data/mysql/updatedatabase.pl

diff --git a/Koha/Schema/Result/Nozebra.pm b/Koha/Schema/Result/Nozebra.pm
deleted file mode 100644 (file)
index b7a24b0..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-package Koha::Schema::Result::Nozebra;
-
-# Created by DBIx::Class::Schema::Loader
-# DO NOT MODIFY THE FIRST PART OF THIS FILE
-
-use strict;
-use warnings;
-
-use base 'DBIx::Class::Core';
-
-
-=head1 NAME
-
-Koha::Schema::Result::Nozebra
-
-=cut
-
-__PACKAGE__->table("nozebra");
-
-=head1 ACCESSORS
-
-=head2 server
-
-  data_type: 'varchar'
-  is_nullable: 0
-  size: 20
-
-=head2 indexname
-
-  data_type: 'varchar'
-  is_nullable: 0
-  size: 40
-
-=head2 value
-
-  data_type: 'varchar'
-  is_nullable: 0
-  size: 250
-
-=head2 biblionumbers
-
-  data_type: 'longtext'
-  is_nullable: 0
-
-=cut
-
-__PACKAGE__->add_columns(
-  "server",
-  { data_type => "varchar", is_nullable => 0, size => 20 },
-  "indexname",
-  { data_type => "varchar", is_nullable => 0, size => 40 },
-  "value",
-  { data_type => "varchar", is_nullable => 0, size => 250 },
-  "biblionumbers",
-  { data_type => "longtext", is_nullable => 0 },
-);
-
-
-# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HEbJLtO1Tpyvy9/w8dnS2w
-
-
-# You can replace this text with custom content, and it will be preserved on regeneration
-1;
index b4ddfa0..df446bc 100644 (file)
@@ -41,7 +41,6 @@ UPDATE systempreferences SET value = 'en,it-IT' WHERE variable = 'language';
 UPDATE systempreferences SET value = '0' WHERE variable = 'LetterLog';
 UPDATE systempreferences SET value = '0' WHERE variable = 'MARCOrgCode';
 UPDATE systempreferences SET value = '2' WHERE variable = 'maxreserves';
-UPDATE systempreferences SET value = '0' WHERE variable = 'NoZebra';
 UPDATE systempreferences SET value = '0' WHERE variable = 'OpacAuthorities';
 UPDATE systempreferences SET value = 'relevance' WHERE variable = 'OPACdefaultSortField';
 UPDATE systempreferences SET value = 'asc' WHERE variable = 'OPACdefaultSortOrder';
@@ -67,4 +66,3 @@ UPDATE systempreferences SET value = '1' WHERE variable = 'XISBN';
 
 UPDATE systempreferences SET value = '#200|<span style=\"font-weight:bold\">|{200a}{. 200c}{ : 200e}{200d}{ / 200f}{ ; 200g}{. 200h}{. 200i}|</span>\r\n#210|. &ndash; |{210a}{ : 210c}{, 210d}|\r\n#215|. &ndash; |{215a}{ ; 215d}|\r\n#225|. &ndash; |{(225a}{ ; 225v)}|\r\n#010|. &ndash; |{ISBN 010a}|' WHERE variable = 'ISBD';
 
-UPDATE systempreferences SET value = '\'title\' => \'200a,200c,200d,200e,225a,225d,225e,225f,225h,225i,225v,500*,501*,503*,510*,512*,513*,514*,515*,516*,517*,518*,519*,520*,530*,531*,532*,540*,541*,545*,604t,610t,605a\',\r\n\'author\' => \'200f,600a,601a,604a,700a,700b,700c,700d,700a,701b,701c,701d,702a,702b,702c,702d,710a,710b,710c,710d,711a,711b,711c,711d,712a,712b,712c,712d\',\r\n\'isbn\' => \'010a\',\r\n\'issn\' => \'011a\',\r\n\'biblionumber => \'0909\',\r\n\'itemtype\' => \'200b\',\r\n\'language\' => \'101a\',\r\n\'publisher\' => \'210c\',\r\n\'date\' => \'210d\',\r\n\'note\' => \r\n\'300a,301a,302a,303a,304a,305a,306az,307a,308a,309a,310a,311a,312a,313a,314a,315a,316a,317a,318a,319a,320a,321a,322a,323a,324a,325a,326a,327a,328a,330a,332a,333a,336a,337a,345a\',\r\n\'Koha-Auth-Number\' => \'6009,6019,6029,6039,6049,6059,6069,6109,7009,7019,7029,7109,7119,7129\',\r\n        \'subject\' => \'600*,601*,606*,610*\',\r\n        \'dewey\' => \'676a\',\r\n        \'homebranch\' => \'995a,995b\',\r\n        \'lcn\' => \'995k\'' WHERE variable = 'NoZebraIndexes';
index 125a668..f4c52a1 100755 (executable)
@@ -8056,6 +8056,16 @@ if ( CheckVersion($DBversion) ) {
    SetVersion ($DBversion);
 }
 
+$DBversion = "3.15.00.XXX";
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        DELETE FROM systempreferences WHERE variable = 'NoZebraIndexes'
+    });
+    print "Upgrade to $DBversion done (Bug 10012 - remove last vestiges of NoZebra)\n";
+    SetVersion($DBversion);
+}
+
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)