Added version checking to SQL database to prevent data inconsistancies
with updates