# Integrity Constraint Violation

**URL:** <https://forum.mautic.org/t/integrity-constraint-violation/16731>\
**Category:** General Discussion\
**Created:** [October 24, 2020, 8:30pm UTC](https://forum.mautic.org/t/integrity-constraint-violation/16731 "2020-10-24T20:30:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![codes9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/codes9/32/682_2.png) [@codes9](https://forum.mautic.org/u/codes9)\
**Post date:** [October 30, 2020, 12:34pm UTC](https://forum.mautic.org/t/integrity-constraint-violation/16731/2 "2020-10-30T12:34:49Z")

</div>

@EJL

Seems you have bigger headaches than I have.

The integrity violation seems to point to a foreign key that does not exist in the database.

**Try:**  
mautic:segment:update --force

Timing sounds like it could be an issue when you get to importing so many records. I would run each command from the terminal and time how long it takes to ge the Cron timing more aligned.

---

_[View the full topic](https://forum.mautic.org/t/integrity-constraint-violation/16731)._
