moved migration to writer.