# Doctrine Errors while updating 4.4.13 to 5.2.7 Composer Based

**URL:** <https://forum.mautic.org/t/doctrine-errors-while-updating-4-4-13-to-5-2-7-composer-based/36229>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [July 31, 2025, 8:41pm UTC](https://forum.mautic.org/t/doctrine-errors-while-updating-4-4-13-to-5-2-7-composer-based/36229 "2025-07-31T20:41:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/timl/32/1666_2.png) [@timl](https://forum.mautic.org/u/timl)\
**Post date:** [July 31, 2025, 8:41pm UTC](https://forum.mautic.org/t/doctrine-errors-while-updating-4-4-13-to-5-2-7-composer-based/36229/1 "2025-07-31T20:41:05Z")

</div>

**Your software**  
My Mautic version is: 4.4.13 \> 5.2.7  
My PHP version is: 8.3  
My Database type and version is: MySQL

**Your problem**  
My problem is:

When I run `php bin/console doctrine:migrations:migrate` I get this error:

[notice] Migrating up to Mautic\Migrations\Versionzz20230929183000  
[error] Migration Mautic\Migrations\Version020230615115326 failed during Execution. Error: “An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mauticdb.vmdynamic\_content’ doesn’t exist”

In ExceptionConverter.php line 49:

An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mauticdb.vmdynamic\_content’ doesn’t exist

In Exception.php line 28:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mauticdb.vmdynamic\_content’ doesn’t exist

In Connection.php line 71:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘mauticdb.vmdynamic\_content’ doesn’t exist

So I ran `php bin/console doctrine:schema:validate` and got this information:

## Mapping

[FAIL] The entity-class Mautic\DynamicContentBundle\Entity\DynamicContentLeadData mapping is invalid:

- The association Mautic\DynamicContentBundle\Entity\DynamicContentLeadData#dynamicContent refers to the inverse side field Mautic\DynamicContentBundle\Entity\DynamicContent#id which is not defined as association.
- The association Mautic\DynamicContentBundle\Entity\DynamicContentLeadData#dynamicContent refers to the inverse side field Mautic\DynamicContentBundle\Entity\DynamicContent#id which does not exist.

## Database

In Exception.php line 115:

Unknown column type “json\_array” requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \D  
octrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. Use AbstractPla  
tform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapp  
ing information.

These errors are showing in the log: see above

Steps I have tried to fix the problem:

I found this post ( [Mautic 5 Migration Issue – Internal Server Error & Failed Database Migration](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930) ) but I’m not entirely certain it applies to me, and found the advice difficult to follow since I don’t often work with databases directly

---

<div class="post-metadata">

**Author:** ![timl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/timl/32/1666_2.png) [@timl](https://forum.mautic.org/u/timl)\
**Post date:** [August 6, 2025, 2:29pm UTC](https://forum.mautic.org/t/doctrine-errors-while-updating-4-4-13-to-5-2-7-composer-based/36229/2 "2025-08-06T14:29:12Z")

</div>

Alright I was able to figure this out, thanks to Perplexity. I stepped through 5.0.4 and 5.1.0 before going to 5.2.7 (and then 6.0.3). There were several problems with database migrations related to the json\_array issue, old charactersets, old collations, and missing tables for dynamic content, plus one problem with a row being treated as an array.

Honestly, I have no idea why the migration itself couldn’t handle these errors or why there is no documentation available on any problems that might come up. It’s been incredibly frustrating, sucked literal weeks from my life, and hasn’t gone _at all_ to plan, but I’ve got it updated and running again now. Yay!

Thankfully I started with a test system and didn’t attempt any of that live before documenting my steps. I’ll gladly share my knowledge with anyone else who’s having similar issues.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [August 8, 2025, 2:29am UTC](https://forum.mautic.org/t/doctrine-errors-while-updating-4-4-13-to-5-2-7-composer-based/36229/3 "2025-08-08T02:29:52Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
