Smarter check on DB version