Our .Net Sitecore (9.01) solution have gone from Web Forms to MVC renderings some time ago. Problem is that all pages have not been converted to MVC and it is starting to be a big problem.
While researching simpler ways to convert pages, I created a script to convert one page from Web Forms to MVC which works great and we are planning to release this soon to our content editors. Now the problem lies in, what if something goes wrong? I though about this and created a backup package from the page and related datasources. But the only way to get the package to revert everything correctly, it needs to completely overwrite everything and any type of merge does not work. Overwriting a page would remove all the subpages.
The question I have, is there some pipeline that handles package installation were I could check if the package items have different templates than what lies in the database, to be able to revert those template changes at that stage.
A solution would be to make the package create backup of all subpages but I would rather fix this only working with the related items.