# Error Updating from Mautic 3.0 --\>3.01

**URL:** https://forum.mautic.org/t/error-updating-from-mautic-3-0-3-01/15038
**Category:** Mautic 3 - Install/Upgrade Support
**Created:** [July 1, 2020, 8:01pm UTC](https://forum.mautic.org/t/error-updating-from-mautic-3-0-3-01/15038 "2020-07-01T20:01:04Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![aerendir](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aerendir/32/1050_2.png) [@aerendir](https://forum.mautic.org/u/aerendir)
#### Post date: [February 18, 2022, 3:59pm UTC](https://forum.mautic.org/t/error-updating-from-mautic-3-0-3-01/15038/11 "2022-02-18T15:59:05Z")

</div>

Dropping the foreign key doesn’t work.

Once dropped, running a `bin/console doctrine:schema:update --force` tries to recreate the foreign key, but the query results in an error:

> An exception occurred while executing ‘ALTER TABLE \*\_oauth2\_accesstokens ADD CONSTRAINT FK\_E6019FAD19EB6921 FOREIGN KEY (client\_id) REFERENCES \*\_oauth2\_clients (id) ON DELETE CASCADE’:
> 
> SQLSTATE[HY000]: General error: 3780 Referencing column ‘client\_id’ and referenced column ‘id’ in foreign key constraint ‘FK\_E6019FAD19EB6921’ are incompatible.

So, the real issue is with the relation between `Mautic\ApiBundle\Entity\oAuth2\AccessToken::$client` and `Mautic\ApiBundle\Entity\oAuth2\$id`.

Currently, in my database, `oauth_accesstokens::client_id` is ´UNSIGNED`while`oauth2\_clients::id`is not, but I don't know if`UNSIGNED` can cause the error.

I’m investigating further…

---

_[View the full topic](https://forum.mautic.org/t/error-updating-from-mautic-3-0-3-01/15038)._
