call migrate automatically