Open matthieumarrast opened 11 months ago
Same or different thing than #252 ?
Updating meaning uninstalling previous then installing new one seems quite normal to me (same thing for rpms I think). But we probably should save the database when uninstalling the plugin and provide a way to restore it afer update.
Yes save+restore the database can be a solution ! but not deleting it can be a better one... but it's not an easy fix, regarding how it's currently done between mfext, mfplugin and mfbase...
We have lost a database while updating a plugin mfbase.
Problem
In mfext, updating a plugin trigger the uninstall of the plugin:
It causes mfbase to call the preunintall script (https://github.com/metwork-framework/mfbase/blob/master/adm/_plugins.preuninstall) with the dropdb/dropuser commands:
Proposed solution
During the plugin "update", if the database/user already exists, do not drop them!
But it seems in metwork the update always uninstalls then installs...