I recently heard from a support team for a particular plugin which shall go unnamed:
You are right, (our plugin) does not clean the tables upon deleting the plugin. If you really want to remove all the table upon deletion, you may use a plugin to clean your database.
We do not remove the table data for security purposes in case if you come back to the plugin again, you can continue from where you left it."
It would seem to make more sense to keep the tables intact upon deactivation, but delete them upon pluin removal/deletion.
Is there a difference between the deactivation action vs the deletion action technically, such that the above logic would work? I.e., can the plugin "know the difference" wheter it's being deactivated vs deleted?
And if so, how could that be implemented (generally)?