Use transactions when deleting/adding module version
This is currently performed without transactions and, if an error occurs when extracting the module, the current version of the model will be removed and the new module version will be adding but without any populated data