refact migrate