# Mautic 5 Migration Issue – Internal Server Error & Failed Database Migration

**URL:** <https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [February 4, 2025, 9:37pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930 "2025-02-04T21:37:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 4, 2025, 9:37pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/1 "2025-02-04T21:37:48Z")

</div>

We are in the process of migrating and upgrading our Mautic instance from version 4 to 5 on a new host.

The old server was running MySQL, while the new server is using MariaDB.

We installed Composer and performed a fresh, clean installation of Mautic 5. Then, we emptied the Mautic 5 database and cache folder to prepare for importing the Mautic 4 database. After successfully importing the Mautic 4 database into Mautic 5, we attempted to run the Mautic migration process to update the database schema.

However, we encountered errors during the migration. Initially, we were able to log in using the Mautic 4 admin credentials, but the system crashed when attempting to access any application features in Mautic 5. After clearing the cache multiple times, we are now unable to log in at all, receiving an internal server error instead.

Below is the error message from the migration process.

Based on the steps we followed, this approach should have worked for migrating from Mautic 4 on the old server to Mautic 5, correct? The only major differences we noticed are the file path structure and the database switch from MySQL to MariaDB. Could that be causing the issue?

```auto
mas-ssh@testcpserver:~/htdocs$ /usr/bin/php8.1 bin/console doctrine:migrations:migrate --no-interaction
[2025-02-04 21:58:24]
[2025-02-04 21:58:24]
[2025-02-04 21:58:24] [WARNING] You have 47 previously executed migrations in the database that are
[2025-02-04 21:58:24] not registered migrations.
[2025-02-04 21:58:24]
[2025-02-04 21:58:24]
[2025-02-04 21:58:24] >> 2022-03-16 22:54:32 (20180508202930)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:32 (20180702014364)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:32 (20180702014365)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:33 (20180821144204)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:33 (20180921144421)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:33 (20181111095447)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:33 (20190704154940)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:33 (20190724110039)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:33 (20191017140848)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20191126093923)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20191206113956)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20191219155630)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20200211095409)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20200212141530)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20200220172041)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20200227110431)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20200302164801)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:34 (20200331160919)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:35 (20200409102100)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:35 (20200422144300)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:35 (20200507122854)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:35 (20200729170800)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:35 (20200805185714)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:35 (20200810153131)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:35 (20200812180900)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:35 (20200815153711)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20200924080139)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201015084627)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201102120710)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201102133546)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201105120328)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201120122846)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201123070813)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201125155904)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201130201631)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201207114926)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201207140911)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20201228041109)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:36 (20210104171005)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:37 (20210203143600)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:37 (20210223174702)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:37 (20210502162314)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:37 (20210520100503)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:37 (20210609191822)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:37 (20210614151138)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:37 (20210623071326)
[2025-02-04 21:58:24] >> 2022-03-16 22:54:37 (20220111202917)
[2025-02-04 21:58:24] [notice] Migrating up to Mautic\Migrations\Versionzz20230929183000
[error] Migration Mautic\Migrations\Version20190326190241 failed during Pre-Checks. Error: "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 \Doctrine\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 AbstractPlatform#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 mapping information."

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 \Doctrine\DBAL\Types\Type::getTypesMap(
  ). If this error occurs during database introspection then you might have f
  orgotten to register all database types for a Doctrine Type. Use AbstractPl
  atform#registerDoctrineTypeMapping() or have your custom types implement Ty
  pe#getMappedDatabaseTypes(). If the type name is empty you might have a pro
  blem with the cache or forgot some mapping information.

doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--no-all-or-nothing] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]

```

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 4, 2025, 10:05pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/2 "2025-02-04T22:05:36Z")

</div>

I see this in my error log. I am not sure but I believe that is a plugin maybe? I am checking further on this but wanted to update on this here.

```auto
[2025-02-04T22:03:35.823843+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT'")." at /home/agwm-mas/htdocs/docroot/app/bundles/CoreBundle/Resources/views/Modal/search_commands.html.twig line 46 {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (\"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT'\"). at /home/agwm-mas/htdocs/docroot/app/bundles/CoreBundle/Resources/views/Modal/search_commands.html.twig:46)\n[previous exception] [object] (Doctrine\\DBAL\\Exception\\InvalidFieldNameException(code: 1054): An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT' at /home/agwm-mas/htdocs/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:67)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 1054): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT' at /home/agwm-mas/htdocs/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28)\n[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT' at /home/agwm-mas/htdocs/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:130)"} {"hostname":"testcpserver","pid":153404}
[2025-02-04T22:03:37.659943+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT'")." at /home/agwm-mas/htdocs/docroot/app/bundles/CoreBundle/Resources/views/Modal/search_commands.html.twig line 46 {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (\"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT'\"). at /home/agwm-mas/htdocs/docroot/app/bundles/CoreBundle/Resources/views/Modal/search_commands.html.twig:46)\n[previous exception] [object] (Doctrine\\DBAL\\Exception\\InvalidFieldNameException(code: 1054): An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT' at /home/agwm-mas/htdocs/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:67)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 1054): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT' at /home/agwm-mas/htdocs/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28)\n[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l0_.is_index' in 'SELECT' at /home/agwm-mas/htdocs/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:130)"} {"hostname":"testcpserver","pid":153404}

```

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 4, 2025, 10:27pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/3 "2025-02-04T22:27:38Z")

</div>

I installed the Twig plugin from the Mautic 4 and now I get a new error when trying to access Mautic page … This message show up (yes I did clear cache)

The “app/bundles/CoreBundle/Resources/views/Offline” directory does not exist (“//app/bundles/CoreBundle/Resources/views/Offline”).

I looked and the directory does exist and it’s there

```auto
agwm-mas@testcpserver:~/htdocs/docroot/app/bundles/CoreBundle/Resources/views/Offline$ ls
offline.html.twig

```

What am I missing?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 4, 2025, 10:35pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/4 "2025-02-04T22:35:15Z")

</div>

I reran migrate again to see what it would do this time and here the error which is different from last time.

```auto
agwm-mas@testcpserver:~/htdocs$ php bin/console doctrine:migrations:migrate --no-interaction
PHP Fatal error: Declaration of MauticPlugin\MauticTwigTemplatesBundle\Security\Permissions\TwigTemplatesPermissions::buildForm(Symfony\Component\Form\FormBuilderInterface &$builder, array $options, array $data) must be compatible with Mautic\CoreBundle\Security\Permissions\AbstractPermissions::buildForm(Symfony\Component\Form\FormBuilderInterface &$builder, array $options, array $data): void in /home/agwm-mas/htdocs/docroot/plugins/MauticTwigTemplatesBundle/Security/Permissions/TwigTemplatesPermissions.php on line 44
agwm-mas@testcpserver:~/htdocs$

```

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 6, 2025, 2:56am UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/5 "2025-02-06T02:56:26Z")

</div>

Seems nobody isn’t able to help me with this yet so I am assuming it probably the plugins that causing my issue since it wouldn’t be compatible with Mautic 5 from 4.

I would have assume a good software would still upgrade successfully but disable plugin if it not compatible instead of preventing a upgrade or locking it up.

I haven’t tried removing plugins yet but plan to test that soon. I am still hoping there a way around to this issue without having to start tearing my Mautic 4 apart so I could just update it to 5.

Bill

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 6, 2025, 6:08am UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/6 "2025-02-06T06:08:48Z")

</div>

Hello Bill!  
Are yuo using the upgraded M5 version of the TwigTemplates Plugin?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 6, 2025, 1:44pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/7 "2025-02-06T13:44:29Z")

</div>

We may not use Twig anymore in the new version since we hardly ever used it in 4. We want to be able to upgrade without having to use the plugins or needing to pay and upgrade plugins that we don’t use anymore.

---

<div class="post-metadata">

**Author:** ![aymen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aymen/32/13647_2.png) [@aymen](https://forum.mautic.org/u/aymen)\
**Post date:** [February 6, 2025, 2:05pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/8 "2025-02-06T14:05:40Z")

</div>

Hello @techbill I faced the same issue can u check [this repo](https://github.com/babycoder/mautic-docker/) it may help

✅ Setting up Mautic in Docker  
✅ Exporting data from a live instance  
✅ Migrating the database to the new Dockerized version  
✅ Handling potential issues during migration

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 6, 2025, 2:12pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/9 "2025-02-06T14:12:23Z")

</div>

Just delete the plugin, delete cache, and try to clear cache again, and continue with the migrations.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 6, 2025, 2:14pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/10 "2025-02-06T14:14:52Z")

</div>

Oh sorry, I can see you have the ‘json array’ issue.  
Try this:

1. Look for tables with the comment json\_array  
Mysql:  
SELECT table\_schema, table\_name, column\_name, column\_comment FROM information\_schema.columns WHERE column\_comment LIKE ‘%(DC2Type:json\_array)%’;

2. Change them:  
ALTER TABLE custom\_field MODIFY COLUMN params longtext COLLATE utf8mb4\_unicode\_ci COMMENT ‘(DC2Type:json)’;

(use the right columns)

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 6, 2025, 2:17pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/11 "2025-02-06T14:17:54Z")

</div>

Actually, I think I managed to fix that json array issue.

It a different issue now. I delete the outdated plugins and now I am getting this when trying to migrate so I am still investigating.

In DefinitionErrorExceptionPass.php line 49:

Cannot autowire service “MauticPlugin\MauticAdvancedTemplatesBundle\Feed\Fe  
ed”: argument “$feed” of method “\_\_construct()” has no type-hint, you shoul  
d configure its value explicitly.

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 6, 2025, 2:25pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/12 "2025-02-06T14:25:29Z")

</div>

Cool. I will check it out.

Thanks

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 6, 2025, 2:25pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/13 "2025-02-06T14:25:56Z")

</div>

I get this when trying to SELECT

#1064 - 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 ‘:json\_array)%’ LIMIT 0, 25’ at line 1

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 6, 2025, 2:30pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/14 "2025-02-06T14:30:48Z")

</div>

> [@joeyk](#):
>
> SELECT table\_schema, table\_name, column\_name, column\_comment FROM information\_schema.columns WHERE column\_comment LIKE ‘%(DC2Type:json\_array)%

SELECT table\_schema, table\_name, column\_name, column\_comment FROM information\_schema.columns WHERE column\_comment LIKE ‘%(DC2Type:json\_array)%

without the ’

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 6, 2025, 2:32pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/15 "2025-02-06T14:32:00Z")

</div>

If you have ‘leftovers’ from old plugins you deleted, you can always really clear the cache:  
rm -rf /var/www/html/mautic/var/cache/prod/\*

(Adjust your path)

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 6, 2025, 2:40pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/16 "2025-02-06T14:40:02Z")

</div>

Ok I deleted some more plugins and deleted the cache folder.

Now that json error is back again

```auto
agwm-mas@testcpserver:~/htdocs$ php bin/console doctrine:migrations:migrate --no-interaction
[2025-02-06 15:38:47]
[2025-02-06 15:38:47]
[2025-02-06 15:38:47] [WARNING] You have 47 previously executed migrations in the database that are
[2025-02-06 15:38:47] not registered migrations.
[2025-02-06 15:38:47]
[2025-02-06 15:38:47]
[2025-02-06 15:38:47] >> 2022-03-16 22:54:32 (20180508202930)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:32 (20180702014364)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:32 (20180702014365)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:33 (20180821144204)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:33 (20180921144421)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:33 (20181111095447)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:33 (20190704154940)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:33 (20190724110039)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:33 (20191017140848)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20191126093923)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20191206113956)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20191219155630)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20200211095409)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20200212141530)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20200220172041)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20200227110431)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20200302164801)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:34 (20200331160919)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:35 (20200409102100)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:35 (20200422144300)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:35 (20200507122854)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:35 (20200729170800)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:35 (20200805185714)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:35 (20200810153131)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:35 (20200812180900)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:35 (20200815153711)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20200924080139)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201015084627)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201102120710)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201102133546)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201105120328)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201120122846)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201123070813)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201125155904)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201130201631)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201207114926)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201207140911)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20201228041109)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:36 (20210104171005)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:37 (20210203143600)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:37 (20210223174702)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:37 (20210502162314)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:37 (20210520100503)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:37 (20210609191822)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:37 (20210614151138)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:37 (20210623071326)
[2025-02-06 15:38:47] >> 2022-03-16 22:54:37 (20220111202917)
[2025-02-06 15:38:47] [notice] Migrating up to Mautic\Migrations\Versionzz20230929183000
[error] Migration Mautic\Migrations\Version20190326190241 failed during Pre-Checks. Error: "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 \Doctrine\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 AbstractPlatform#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 mapping information."

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 \Doctrine\DBAL\Types\Type::getTypesMap(
  ). If this error occurs during database introspection then you might have f
  orgotten to register all database types for a Doctrine Type. Use AbstractPl
  atform#registerDoctrineTypeMapping() or have your custom types implement Ty
  pe#getMappedDatabaseTypes(). If the type name is empty you might have a pro
  blem with the cache or forgot some mapping information.

```

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 6, 2025, 2:45pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/17 "2025-02-06T14:45:06Z")

</div>

Whenever I make any changes in Mautic, I just do a rm -rf cache and delete the whole cache folder. Now I have this json error again and I tried your suggestion to select and alter but I am getting an error trying to select.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 6, 2025, 2:53pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/18 "2025-02-06T14:53:10Z")

</div>

Do you have prefix for your tables?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 6, 2025, 2:54pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/19 "2025-02-06T14:54:28Z")

</div>

> [@joeyk](#):
>
> SELECT table\_schema, table\_name, column\_name, column\_comment FROM information\_schema.columns WHERE column\_comment LIKE ‘%(DC2Type:json\_array)%

Try this:

`SELECT table_schema, table_name, column_name, column_comment FROM information_schema.columns WHERE column_comment LIKE "%(DC2Type:json_array)%";`

---

<div class="post-metadata">

**Author:** ![aymen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aymen/32/13647_2.png) [@aymen](https://forum.mautic.org/u/aymen)\
**Post date:** [February 6, 2025, 2:55pm UTC](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930/20 "2025-02-06T14:55:45Z")

</div>

make a dump of your database, **Mautic uses Symfony and Doctrine updates, which may have changed the way JSON fields are handled. If Mautic previously used json\_array and the new version expects json, this fix ensures compatibility.**

`sed -i 's/\bjson_array\b/json/g' mautic_backup.sql `  
re import it and run the migration again then clear the cache

[Next page](https://forum.mautic.org/t/mautic-5-migration-issue-internal-server-error-failed-database-migration/34930.md?page=2)
