fixing schema changes for history tables