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.
Created attachment 74892 [details] [review] 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.
Great enhancement! Is there a test plan?
(In reply to Magnus Enger from comment #2) > Great enhancement! Is there a test plan? Nope, but I could add something to the Kitchen Sink plugin to test with if you'd like!
(In reply to Kyle M Hall from comment #3) > (In reply to Magnus Enger from comment #2) > > Great enhancement! Is there a test plan? > > Nope, but I could add something to the Kitchen Sink plugin to test with if > you'd like! This would be great I think, also for QA later :)
Created attachment 75704 [details] [review] 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
Created attachment 75705 [details] [review] 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
Created attachment 78976 [details] [review] 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>
Created attachment 79232 [details] [review] 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>
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.05. I chose to backport this enhancement in line with my policy of backporting non-breaking change enhancements to the API and Plugin systems.
Pushed to 17.11.x for 17.11.11