# \[ipboard.rb\] ERROR: duplicate key value violates unique constraint "import\_ids\_pkey" (PG::UniqueViolation)

**URL:** <https://meta.discourse.org/t/ipboard-rb-error-duplicate-key-value-violates-unique-constraint-import-ids-pkey-pg-uniqueviolation/208492>\
**Category:** Migration\
**Created:** [7 בנובמבר,‏ 2021,‏ 6:54pm UTC](https://meta.discourse.org/t/ipboard-rb-error-duplicate-key-value-violates-unique-constraint-import-ids-pkey-pg-uniqueviolation/208492 "2021-11-07T18:54:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [8 בנובמבר,‏ 2021,‏ 4:35pm UTC](https://meta.discourse.org/t/ipboard-rb-error-duplicate-key-value-violates-unique-constraint-import-ids-pkey-pg-uniqueviolation/208492/4 "2021-11-08T16:35:27Z")

</div>

Souds like something non-obvious. My best guess is something like. . . well. I don’t have a best guess.

Maybe the query is somehow returning those topics twice somehow? You might try adding a `.where ID=123` to the query that’s getting the topics to see if it’s somehow getting it twice and then figure out why.

---

_[View the full topic](https://meta.discourse.org/t/ipboard-rb-error-duplicate-key-value-violates-unique-constraint-import-ids-pkey-pg-uniqueviolation/208492)._
