added auto migrate