initial logic for checking database version and applying update scripts