write migrate file.