Fix migration to actually do the right thing