Fix migration that is broken in postgres only