Rolling back an application which includes a relational database is very tricky. Traditionally this is done by restoring from a backup, performed prior to the upgrade.
A more modern approach is to integrate a database migration tool, like liquibase, into your application's installation procedure. liquibase tracks each change to your database's schema which enables it to generate scripts for both upgrade and rollback.