Ways to verify database integrity

We use liquibase to perform all our database upgrades and it works well.  Very happy with it…


I’m curious if it provides a piece of functionality - I’d like to be able to run ‘something’ at startup or as a separate program that can verify that the version of the software is compatible with the version of the DB.  The trick here is - I don’t necessarily use just the DBChangeLog table because someone could have run a changeset, then went back in and ‘removed’ the column that the changeset just added.  This type of behavior is what I’m hoping to verify.


Is there any way to do that type of thing using liquibase?

There is support for preconditions on changeSets and the changelog file itself. There are several that ship with liquibase (see http://www.liquibase.org/manual/preconditions) and with liquibase 2.0 you are able to define custom preconditions as well (see http://liquibase.org/extensions)


Is that the sort of functionality you are looking for?

Nathan