# Import failing with \`could not create unique index\`

**URL:** <https://meta.discourse.org/t/import-failing-with-could-not-create-unique-index/154693>\
**Category:** Self-hosting\
**Created:** [12 juni 2020 om 19:10 UTC](https://meta.discourse.org/t/import-failing-with-could-not-create-unique-index/154693 "2020-06-12T19:10:16Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Paulus\_Schoutsen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paulus_schoutsen/32/183883_2.png) [@Paulus\_Schoutsen](https://meta.discourse.org/u/Paulus_Schoutsen)\
**Post date:** [12 juni 2020 om 19:42 UTC](https://meta.discourse.org/t/import-failing-with-could-not-create-unique-index/154693/3 "2020-06-12T19:42:49Z")

</div>

Would I need to clean up IncomingLink and IncoingReferrer too, since referrer points at IncomingDomain and IncomingLink points at IncomingReferrer?

Doing the query now and will try to import another backup. Querying via postgres actually gives me different results than using Rails. But I guess that might be because of a default scope?

---

_[View the full topic](https://meta.discourse.org/t/import-failing-with-could-not-create-unique-index/154693)._
