writing migration