Key duplicate error on postgres uses SQLSTATE=23505