fix mysql to pgsql