Bug 22053: update database
authorAlex Arnaud <alex.arnaud@biblibre.com>
Fri, 28 Dec 2018 16:52:18 +0000 (17:52 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 9 May 2019 18:54:45 +0000 (18:54 +0000)
Rebased-on: 2019-03-25 Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

installer/data/mysql/atomicupdate/bug_22053_enable-all-plugins.perl [new file with mode: 0644]

diff --git a/installer/data/mysql/atomicupdate/bug_22053_enable-all-plugins.perl b/installer/data/mysql/atomicupdate/bug_22053_enable-all-plugins.perl
new file mode 100644 (file)
index 0000000..63ef70a
--- /dev/null
@@ -0,0 +1,14 @@
+$DBversion = 'XXX';  # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+
+    use Koha::Plugins;
+
+    my @plugins = Koha::Plugins->new()->GetPlugins({ all => 1 });
+    foreach my $plugin ( @plugins ) {
+        $plugin->enable;
+    }
+
+    # Always end with this (adjust the bug info)
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 22053 - enable all plugins)\n";
+}
\ No newline at end of file