Wow this is nice! I did not see this coming...
LZ
On Sun, May 7, 2017 at 3:58 PM, Shimon Shtein wrote:
>
> OK, it wasn't exactly my intention, but I see the discussion moves towards
> general plugin install/uninstall procedure.
>
> I have discovered a nice feature that
OK, it wasn't exactly my intention, but I see the discussion moves towards
general plugin install/uninstall procedure.
I have discovered a nice feature that enables us to isolate plugin
migrations, and run them on per-plugin manner:
Apparently we can run:
rake db:migrate SCOPE=my_plugin
rake
I agree with Tomas, it's more cleaner to remove all the data right
away. Therefore I suggest that we check for these kind of objects
during initialization and if such an class is (not) found, then we can
throw an error like "Run foreman-rake plugin:clean" to delete orhpaned
records.
I am for (A)
Thanks for bringing this up. I think the right approach is to have plugin
uninstallation or rather clean up rake tasks. The clean up should IMHO delete
all data that would case problems after code removal. It shouldn't try to
revert the schema changes, but destroy all data that can cause
This issue is tightly coupled with plugin uninstallation and I think
we should solve the two problems together. At the moment there's no
standard plugin uninstallation procedure that would take care of
cleaning up the system. This is something each plugin should provide.
One thing (imho the less