undo changes for db