move Mappings helper function to migration