Run migrations before upgrades