flatten migrations