sync function for updated schema