change script responding to DB layout change