Make migration idempotent

Makes @samjsharpe happy.