Migration from 3.1.2 to 3.2.2 error Unknown database type json requested

Your software
My Mautic version is: 3.2.2
My PHP version is: 7.2
My Database type and version is: MySQL 5.7

Your problem
My problem is: Error while trying php bin/console mautic:update:apply --finish

These errors are showing in the log:
Step 1 [->--------------------------] Migrating database schema…

An error occurred while updating the database. Check log for more details.

==> var/logs/mautic_prod-2021-01-12.php <==
[2021-01-12 12:28:51] 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-3.1.2-migration-failed/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php line 436 while running console command doctrine:migrations:migrate
[2021-01-12 12:28:51] mautic.WARNING: Command doctrine:migrations:migrate exited with status code 1
[2021-01-12 12:28:51] mautic.WARNING: Command mautic:update:apply exited with status code 1

==> var/logs/prod-2021-01-12.php <==
[2021-01-12 12:28:51] console.ERROR: Error thrown while running command “doctrine:migrations:migrate --quiet --no-interaction”. Message: “Unknown database type json requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.” {“exception”:"[object] (Doctrine\DBAL\DBALException(code: 0): Unknown database type json requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it. at /var/www/html/mautic-3.1.2-migration-failed/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php:436)",“command”:“doctrine:migrations:migrate --quiet --no-interaction”,“message”:“Unknown database type json requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.”}

Steps I have tried to fix the problem: I’m really confused since MySQL should support JSON natively, what I’m missing?

This was a bug that was fixed I believe in 3.2:

Also reported in

Maybe check your file has been updated? See the file changes here.

Hi Ruth, thank you.

Yeah changing db_server_version from 5.5 to 5.7 in app/config/local.php solved the problem, thank you so much!

Regards

1 Like

Hurrah - yes it might catch folk out who are updating as we realised the issue after the release was made. Glad you got it solved!