# Mautic upgrade error from 3.0.2 to 3.1.0

**URL:** https://forum.mautic.org/t/mautic-upgrade-error-from-3-0-2-to-3-1-0/24184
**Category:** Product Support
**Created:** [May 22, 2022, 8:30pm UTC](https://forum.mautic.org/t/mautic-upgrade-error-from-3-0-2-to-3-1-0/24184 "2022-05-22T20:30:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rehansaleem](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rehansaleem/32/398_2.png) [@rehansaleem](https://forum.mautic.org/u/rehansaleem)
#### Post date: [May 22, 2022, 8:30pm UTC](https://forum.mautic.org/t/mautic-upgrade-error-from-3-0-2-to-3-1-0/24184/1 "2022-05-22T20:30:24Z")

</div>

Hello,  
Having trouble upgrading mautic from 3.0.2 to 3.1.0 and system is showing the following error when i upgrade the database schema.

**Your software**  
My Mautic version is: 3.0.2  
My PHP version is: 7.3  
My Database type and version is: Maria db 10.2 and 10.3 are producing same error.

**Your problem**  
mautic.NOTICE: Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing ‘ALTER TABLE maunm\_email\_stats ADD generated\_sent\_date DATE AS (CONCAT(YEAR(date\_sent), “-”, LPAD(MONTH(date\_sent), 2, “0”), “-”, LPAD(DAY(date\_sent), 2, “0”))) COMMENT ‘(DC2Type:generated)’; ALTER TABLE maunm\_email\_stats ADD INDEX `maunm_generated_sent_date_email_id`(generated\_sent\_date, email\_id)’: 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 maunm\_email\_stats ADD INDEX `maunm_generated_sent_date_email_id`(…’ at line 2 (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 while running console command `doctrine:migrations:migrate`

I have changed MySQL database version from mariadb 10.2 to 10.3 as well but both producing the same error.

Thanks
