# \[Site Down :(\] Upgrade\\Rebuild Failure - DB Migration Issue?

**URL:** <https://meta.discourse.org/t/site-down-upgrade-rebuild-failure-db-migration-issue/268359>\
**Category:** Self-hosting\
**Created:** [June 14, 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:** 6

<div class="post-metadata">

**Author:** ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)\
**Post date:** [June 15, 2023, 1:33am UTC](https://meta.discourse.org/t/site-down-upgrade-rebuild-failure-db-migration-issue/268359/6 "2023-06-15T01:33:43Z")

</div>

I guess sudo wouldn’t work, but su did and now I’m poking around in postgres.

So now I need to figure out how to actually fix the duplicates. The query appears to be..

`UPDATE users SET username_lower = 'xxx' WHERE id = xxx;`

I tried a couple of variations to no avail. As you can tell I’m not 100% sure what the correct syntax here as the error is column related.

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/7/2/a72e08999af09bc2ba6f0e763e8312bcf65aa11f.png)

I’ll keep digging. I don’t know how many dups I have yet either…

/edit… it’s just racerx. DAMMIT RACERX!

![image](https://global.discourse-cdn.com/meta/original/4X/5/4/e/54ede9f50cdabc5ffaa055a95e7d49a96e7d5149.png)

---

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