# \[Sito non disponibile :(\] Fallimento aggiornamento/ricostruzione - Problema migrazione DB?

**URL:** https://meta.discourse.org/t/site-down-upgrade-rebuild-failure-db-migration-issue/268359
**Category:** Self-hosting
**Created:** [14 Giugno 2023, 8:49pm UTC](https://meta.discourse.org/t/site-down-upgrade-rebuild-failure-db-migration-issue/268359 "2023-06-14T20:49:04Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [14 Giugno 2023, 8:57pm UTC](https://meta.discourse.org/t/site-down-upgrade-rebuild-failure-db-migration-issue/268359/2 "2023-06-14T20:57:40Z")

</div>

Sembra che ritenga che tu abbia due utenti chiamati `racerx`. Penso che ci sia un argomento su un problema simile qui:

> [@Paulus\_Schoutsen](#):
>
> Avevamo anche 8 utenti che avevano un `username_lower` duplicato (troppi mike e marco). Li abbiamo rinominati aggiornando sia `username` che `username_lower`. Dai dati utente abbiamo notato che la prima corruzione è avvenuta nel dicembre 2019.

Anche uno più recente qui:

> [@PG::UniqueViolation Problem during 3.1.0.beta4 upgrade](https://meta.discourse.org/t/pg-uniqueviolation-problem-during-3-1-0-beta4-upgrade/262163/3?u=jammydodger):
>
> Thanks for your reply. Yes, I am able to start / enter the app, I am also doing as you suggested. discourse=# REINDEX TABLE users; ERROR: could not create unique index "index\_users\_on\_username\_lower" DETAIL: Key (username\_lower)=(mostafa11) is duplicated. The problem is duplicates keep coming, I have a lot of user over 300K. Is there any way to check how many duplicates or list all of them? For fixing, I was updating the username\_lower like this: I was appending some number at the end. U…

---

_[View the full topic](https://meta.discourse.org/t/site-down-upgrade-rebuild-failure-db-migration-issue/268359)._
