before changing db