fix migrate script