# Mislukte upgrade: UniqueViolation: dubbele sleutelwaarde schendt unieke beperking "data\_explorer\_queries\_pkey"

**URL:** <https://meta.discourse.org/t/failed-upgrade-uniqueviolation-duplicate-key-value-violates-unique-constraint-data-explorer-queries-pkey/163667>\
**Category:** Self-hosting\
**Created:** [10 september 2020 om 19:30 UTC](https://meta.discourse.org/t/failed-upgrade-uniqueviolation-duplicate-key-value-violates-unique-constraint-data-explorer-queries-pkey/163667 "2020-09-10T19:30:26Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [10 september 2020 om 20:40 UTC](https://meta.discourse.org/t/failed-upgrade-uniqueviolation-duplicate-key-value-violates-unique-constraint-data-explorer-queries-pkey/163667/10 "2020-09-10T20:40:36Z")

</div>

Yep, also, in general consider running commands to see their impact before committing, see:

> **[PostgreSQL - TRANSACTIONS](https://www.tutorialspoint.com/postgresql/postgresql_transactions.htm)**
>
> In PostgreSQL, a transaction is a logical unit of work that uses SQL queries to combine one or more database operations. These operations shows the sequences like INSERT, UPDATE, DELETE, or SELECT.

Then if you find you have deleted 500 rows when you meant to hit just one, you have the chance to rollback without fear.

---

_[View the full topic](https://meta.discourse.org/t/failed-upgrade-uniqueviolation-duplicate-key-value-violates-unique-constraint-data-explorer-queries-pkey/163667)._
