Fixing version comparison for database schema