# Upgrades failing on migration with unique constraint violation

**URL:** <https://meta.discourse.org/t/upgrades-failing-on-migration-with-unique-constraint-violation/66737>\
**Category:** Product Support\
**Created:** [2017 年7 月 24 日 21:06 UTC](https://meta.discourse.org/t/upgrades-failing-on-migration-with-unique-constraint-violation/66737 "2017-07-24T21:06:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

作者： ![burke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/burke/32/4211_2.png) [@burke](https://meta.discourse.org/u/burke)\
发布日期： [2017 年10 月 10 日 04:11 UTC](https://meta.discourse.org/t/upgrades-failing-on-migration-with-unique-constraint-violation/66737/4 "2017-10-10T04:11:21Z")

</div>

> [@sam](#):
>
> Maybe try hard nuking the badge from the badges table?

`delete from badges where id=5` ftw! Looks like this followed by rebuilding is going to work. Thanks @sam! I think I just needed a nudge to be brave enough to try the nuclear option. 😉

---

_[View the full topic](https://meta.discourse.org/t/upgrades-failing-on-migration-with-unique-constraint-violation/66737)._
