database update scripts to convert legacy data to current version