Bug 19893: (QA follow-up) Convert atomicupdate to .perl
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 13 Nov 2018 11:23:11 +0000 (11:23 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 16 Nov 2018 11:05:00 +0000 (11:05 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

installer/data/mysql/atomicupdate/bug_19893_elasticsearch_index_status_sysprefs.perl [new file with mode: 0644]
installer/data/mysql/atomicupdate/bug_19893_elasticsearch_index_status_sysprefs.sql [deleted file]

diff --git a/installer/data/mysql/atomicupdate/bug_19893_elasticsearch_index_status_sysprefs.perl b/installer/data/mysql/atomicupdate/bug_19893_elasticsearch_index_status_sysprefs.perl
new file mode 100644 (file)
index 0000000..ed95da0
--- /dev/null
@@ -0,0 +1,11 @@
+$DBversion = 'XXX';    # will be replaced by the RM
+if ( CheckVersion($DBversion) ) {
+    $dbh->do(q{
+        INSERT IGNORE INTO `systempreferences` (`variable`,`value`,`explanation`,`options`,`type`) VALUES
+        ('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL),
+        ('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL)
+    });
+
+    SetVersion($DBversion);
+    print "Upgrade to $DBversion done (Bug 19893 - Add elasticsearch index status preferences)\n";
+}
diff --git a/installer/data/mysql/atomicupdate/bug_19893_elasticsearch_index_status_sysprefs.sql b/installer/data/mysql/atomicupdate/bug_19893_elasticsearch_index_status_sysprefs.sql
deleted file mode 100644 (file)
index 2412bcb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL);
-INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL);