This is actually very similar to functionality I just started adding. I’m experimenting with adding verifyUpdate, verifyUpdateDetails, verifyRollback and verifyRollbackDetails methods to each of the change implementations with logic on how to check them. The difference between the *Details and non-details methods is that the regular method checks , for example, that a column was added while the *Details methods check all the other attributes like the data type, if it is a primary key, etc.
I am implementing it within java rather than SQL, where I use the snapshot function to grab the state of the object to check and then inspect it. The reason for this is it gives us more flexibility than what is available through SQL, but it has the limitation that we cannot embed the checks into updateSQL for example.
My initial use for the methods is for automated generative testing of change implemenations, but I see a lot of other advantages such as being able to run an update with automatic “did it run” checks, easier bootstrapping of an existing project, and more. I’m hoping to have it finished up next week and will have a pull request for people to look at.