Make migration work with merge