Upgrading database to new format for sync