Part of canonical.database
Raises an InvalidDatabaseRevision exception if the database patch level is not what is expected.