migrate messages model