Migration scripts improvements for PostgreSQL.