Fix migration for postgresql.