As far as I know , most databases have their own proprietary way of dealing with schema upgrades and rollbacks, you will need to understand how its done in DB2 , Oracle, MySQL etc and then create a common pattern out of it.
http://www.onlineprogrammingbooks.com/download-pdf-foundatio...