add upgrade hook