We have a custom module which has successfully used the update
method in upd.addon-name.php
to apply database changes. We are attempting to use it again for another version update (from 1.4.0 to 1.5.0). This time however, ExpressionEngine says it successfully runs the module update (no error is thrown), but fails to update the version number in exp_modules
. It does this whether or not you update via the "run module updates" button or by visiting the settings for the add-on.
This leads to an attempt to run the upgrade again whenever you visit the settings page for the module, which throws mysql errors complaining about duplicate columns (because it already added them).
Has anyone ever encountered this before? Is it safe to update the version in that table ourselves in the update function as a workaround?
I should mention this has occurred on ExpressionEngine version 2.7.3 on two separate installations.