]> git.koha-community.org Git - koha.git/commit
Bug 20669: Add upgrade method to plugins
authorKyle M Hall <kyle@bywatetsolutions.com>
Thu, 26 Apr 2018 19:07:07 +0000 (15:07 -0400)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 8 Oct 2018 06:00:23 +0000 (08:00 +0200)
commita6f035e1887833f00ba058c45b815bb25240040b
treecc2db27aed2987d984d6be05136e204ea1ae46e4
parent57c049ed81e5a1e7a3c5738f50dda705a2164bfa
Bug 20669: Add upgrade method to plugins

It would be nice if plugins had an upgrade method to handle altering tables and such when a new version of a plugin is installed. Right now it must be done in a completely bespoke manner.

Test Plan:
1) Apply this patch
2) Download the 2 most recent releases of the Kitchen Sink plugin
   https://github.com/bywatersolutions/koha-plugin-kitchen-sink/releases
3) Install the earlier release
4) Look at the configuration page, at the bottom it should say the
   plugin has never been upgraded
5) Install the newer release
6) Reload the configuration page, it should now say that the plugin
   was upgraded and give you the date and time of the upgrade

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 100385196ecadb34669190caa241ed73ea2a5a1c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b3f2a13a4368d9f8bec74a6da920649d56732b71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/Plugins/Base.pm
t/Koha/Plugin/Test.pm
t/db_dependent/Plugins.t