Mautic Community Forums

An error occurred while updating the database

Your software
My Mautic version is: 3.2.1.
My PHP version is:7.2.24, on Ubuntu 18.04
My Database type and version is: MySQL

Your problem
My problem is: i have this error : “An error occurred while updating the database. Check log for more details.” when i’m hitting this link: https://mydomain/mautic/s/update/schema

These errors are showing in the log:2020-11-17 14:31:29] mautic.NOTICE: Doctrine\DBAL\DBALException: Unknown database type json requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it. (uncaught exception) at /var/www/html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php line 436 while running console command doctrine:migrations:migrate
[2020-11-17 14:31:29] mautic.WARNING: Command doctrine:migrations:migrate exited with status code 1
[2020-11-17 14:31:29] mautic.ERROR: [UPGRADE ERROR] Exit code 1; Mautic Migrations \ Migrating up to 20200815153711 from 0 Migration 20181111095447 failed during Pre-Checks. Error Unknown database type json requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it. \ In AbstractPlatform.php line 436: \ Unknown database type json requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it. \ 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] [–] \

Steps I have tried to fix the problem:

What version of MySQL do you run?

We’ve fixed this bug with MySQL 5.7 (Unknown database type json requested) in Mautic 3.2, to be released on November 30. The fix will only apply to new installations and to installations that don’t have db_server_version in their app/config/local.php yet (this is the case if you haven’t changed the default configuration in Mautic’s UI before). Otherwise you have to change the version in app/config/local.php yourself, as mentioned in Mautic 3.1.2 installed - Plugins are not available.

Apologies for the inconvenience and thanks for reporting this!