Added functionality for checking for correct database schema version.