# When trying to schema update in mautic 4.1 I am getting errors

**URL:** <https://forum.mautic.org/t/when-trying-to-schema-update-in-mautic-4-1-i-am-getting-errors/24860>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [July 25, 2022, 12:43pm UTC](https://forum.mautic.org/t/when-trying-to-schema-update-in-mautic-4-1-i-am-getting-errors/24860 "2022-07-25T12:43:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wolfscorp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/wolfscorp/32/2973_2.png) [@wolfscorp](https://forum.mautic.org/u/wolfscorp)\
**Post date:** [July 25, 2022, 12:43pm UTC](https://forum.mautic.org/t/when-trying-to-schema-update-in-mautic-4-1-i-am-getting-errors/24860/1 "2022-07-25T12:43:08Z")

</div>

**Your software**  
_My PHP version is_ : 7.4  
_My MySQL/MariaDB version is_ : 10.5

**Updating/Installing Errors**  
\*I am trying to schema update by [Website-URL.com/](http://Website-URL.com/) s/update/schema and it is getting failed.  
While checking the Mautic logs I found these errors.

_These errors are showing in the installer_ :

[2022-07-25 18:01:06] mautic.NOTICE: Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing ‘ALTER TABLE maupn\_leads ADD generated\_email\_domain VARCHAR(255) AS (SUBSTRING(email, LOCATE(“@”, email) + 1)) COMMENT ‘(DC2Type:generated)’; ALTER TABLE maupn\_leads ADD INDEX `maupn_generated_email_domain`(generated\_email\_domain)’: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE maupn\_leads ADD INDEX `maupn_generated_email_domain`(generated\_em…’ at line 2 (uncaught exception) at **MAUTIC\_LOCATION** /mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 98 while running console command `doctrine:migrations:migrate`

[2022-07-25 18:01:06] mautic.WARNING: Command `doctrine:migrations:migrate` exited with status code 1

[2022-07-25 18:01:06] mautic.ERROR: [UPGRADE ERROR] Exit code 1; ++ adding generated column generated\_email\_domain → ALTER TABLE maupn\_leads ADD generated\_email\_domain VARCHAR(255) AS (SUBSTRING(email, LOCATE(“@”, email) + 1)) COMMENT ‘(DC2Type:generated)’; ALTER TABLE maupn\_leads ADD INDEX `maupn_generated_email_domain`(generated\_email\_domain) \ In AbstractMySQLDriver.php line 98: \ An exception occurred while executing ‘ALTER TABLE maupn\_leads ADD generate d\_email\_domain VARCHAR(255) AS (SUBSTRING(email, LOCATE(“@”, email) + 1)) C OMMENT ‘(DC2Type:generated)’; ALTER TABLE maupn\_leads ADD INDEX `maupn_generated_email_domain `(generated\_email\_domain)’: \ You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE m aupn\_leads ADD INDEX `maupn_generated_email_domain`(generated\_em…’ at lin e 2 \ In ConnectionError.php line 19: \ You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘ALTER TABLE m aupn\_leads ADD INDEX `maupn_generated_email_domain`(generated\_em…’ at lin e 2 \ doctrine:migrations:migrate [–write-sql [WRITE-SQL]] [–dry-run] [–query-time] [–allow-no-migration] [–all-or-nothing [ALL-OR-NOTHING]] [–configuration [CONFIGURATION]] [–db-configuration [DB-CONFIGURATION]] [–db DB] [–em EM] [–shard SHARD] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–] \

_These errors are showing in the Mautic log_ :

**Your problem**  
_My problem is_ :  
I am trying to update to Mautic 4.4 but it is having issues. So, I am being suggested to update the schema first but it is still not happening. Can anybody help me with the work…

---

<div class="post-metadata">

**Author:** ![logprod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/logprod/32/1447_2.png) [@logprod](https://forum.mautic.org/u/logprod)\
**Post date:** [August 11, 2024, 10:00pm UTC](https://forum.mautic.org/t/when-trying-to-schema-update-in-mautic-4-1-i-am-getting-errors/24860/2 "2024-08-11T22:00:04Z")

</div>

Having same issue. .did you figure out a fix?
