updated schema code to fix old fields to be removed.