# Shopware 6 update error

**URL:** <https://forum.shopware.com/t/shopware-6-update-error/63552>\
**Category:** Installation / Einstieg\
**Created:** [14. Dezember 2019 um 15:42 UTC](https://forum.shopware.com/t/shopware-6-update-error/63552 "2019-12-14T15:42:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shopwarer1638](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@shopwarer1638](https://forum.shopware.com/u/shopwarer1638)\
**Post date:** [14. Dezember 2019 um 15:42 UTC](https://forum.shopware.com/t/shopware-6-update-error/63552/1 "2019-12-14T15:42:52Z")

</div>

Hello,

we are trying to update SW6 setup and have this error:&nbsp;

```
Error
Received the following error message:
An exception occurred while executing ' CREATE TABLE `acl_role` ( `id` BINARY(16) NOT NULL, `name` VARCHAR(255) NOT NULL, `created_at` DATETIME(3) NOT NULL, `updated_at` DATETIME(3) NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ': SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'acl_role' already exists

Please try to fix this error and restart the update.
Response
{"valid":false,"errorMsg":"An exception occurred while executing '\n CREATE TABLE `acl_role` (\n `id` BINARY(16) NOT NULL,\n `name` VARCHAR(255) NOT NULL,\n `created_at` DATETIME(3) NOT NULL,\n `updated_at` DATETIME(3) NULL,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci\n ':\n\nSQLSTATE[42S01]: Base table or view already exists: 1050 Table 'acl_role' already exists"}

```

Anyone has such experience?

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [14. Dezember 2019 um 16:03 UTC](https://forum.shopware.com/t/shopware-6-update-error/63552/2 "2019-12-14T16:03:07Z")

</div>

> ‚acl\_role‘ already exists

Maybe you did that update twice? The table has to be removed from the database. Also removing the „dummy“&nbsp; (i think its located in files/update) file when retry the update.

---

<div class="post-metadata">

**Author:** ![shopwarer1638](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@shopwarer1638](https://forum.shopware.com/u/shopwarer1638)\
**Post date:** [20. Dezember 2019 um 14:43 UTC](https://forum.shopware.com/t/shopware-6-update-error/63552/3 "2019-12-20T14:43:37Z")

</div>

> Maybe you did that update twice?

Thank you for a reply Brettvormkopp!

1. Update failed the 1st time and the 2nd, so I did update 0 times. But there were 2 attempts.&nbsp;

&nbsp;

1. Now I need to dig deeper in Shopware SQL structure i guess, because I can’t just delete the&nbsp;table.&nbsp;When I drop it, i got this warning:

_SQL query:_

_DROP TABLE acl\_role_

_MySQL said:&nbsp;_

_#1451 - Cannot delete or update a parent row: a foreign key constraint fails_

&nbsp;

1. Then, when I try to use ON DELETE CASCADE action, i got this:

_SQL query:&nbsp;_

_SELECT TABLE\_NAME FROM referential\_constraints WHERE CONSTRAINT\_SCHEMA = ‚c2064test‘ AND referenced\_table\_name = ‚acl\_role‘ AND delete\_rule = ‚CASCADE‘ LIMIT 0, 25_

_MySQL said:&nbsp;_

_#1146 - Table ‚c2064db\_maksyna\_new.referential\_constraints‘ doesn’t exist_

&nbsp;

Can someone drop a tip for the Shopware database workaround?

Have a lovely weekend!

---

<div class="post-metadata">

**Author:** ![shopwarer1638](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@shopwarer1638](https://forum.shopware.com/u/shopwarer1638)\
**Post date:** [15. Januar 2020 um 18:55 UTC](https://forum.shopware.com/t/shopware-6-update-error/63552/4 "2020-01-15T18:55:55Z")

</div>

If someone have same issue - removing database fields helped to migrate finally.&nbsp;

---

<div class="post-metadata">

**Author:** ![namaste\_nepal](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@namaste\_nepal](https://forum.shopware.com/u/namaste_nepal)\
**Post date:** [10. Juni 2021 um 08:13 UTC](https://forum.shopware.com/t/shopware-6-update-error/63552/5 "2021-06-10T08:13:09Z")

</div>

What do you mean with „removing database fields“?
