# Issues with migration after updating from 4.4 to 5.0.2

**URL:** <https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [February 2, 2024, 9:46am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758 "2024-02-02T09:46:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [February 2, 2024, 9:46am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/1 "2024-02-02T09:46:27Z")

</div>

**Your software**  
My Mautic version is: 5.0.2  
My PHP version is: 8.0  
My Database type and version is: MariaDB

**Your problem**  
I managed to install the update through composer which very badly documented in my opinion.

My issue is that once i am opening the site, the dashboard keeps loading and loading. So i wanted to do the following step by running

php bin/console doctrine:migration:migrate --no-interaction

When i do that i get the following errors:

```auto
root@marketing /var/www/mautic # php bin/console doctrine:migration:migrate --no-interaction
[2024-02-02 09:40:50] 
[2024-02-02 09:40:50]                                                                                                                         
[2024-02-02 09:40:50] [WARNING] You have 47 previously executed migrations in the database that are not registered migrations.               
[2024-02-02 09:40:50]                                                                                                                         
[2024-02-02 09:40:50] 
[2024-02-02 09:40:50] >> 2022-03-20 08:27:01 (20180508202930)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:01 (20180702014364)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:01 (20180702014365)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:02 (20180821144204)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:02 (20180921144421)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:47 (20181111095447)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:02 (20190704154940)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:02 (20190724110039)
[2024-02-02 09:40:50] >> 2021-10-26 08:49:03 (20191017140848)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:48 (20191126093923)
[2024-02-02 09:40:50] >> 2021-10-26 08:49:04 (20191206113956)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:48 (20191219155630)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:49 (20200211095409)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:58 (20200212141530)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:58 (20200220172041)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:59 (20200227110431)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:59 (20200302164801)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:02 (20200331160919)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:03 (20200409102100)
[2024-02-02 09:40:50] >> 2020-09-14 09:21:59 (20200422144300)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:03 (20200507122854)
[2024-02-02 09:40:50] >> 2022-03-20 08:27:03 (20200729170800)
[2024-02-02 09:40:50] >> 2020-09-14 11:26:53 (20200805185714)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:00 (20200810153131)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:01 (20200812180900)
[2024-02-02 09:40:50] >> 2020-09-14 11:26:53 (20200815153711)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:01 (20200924080139)
[2024-02-02 09:40:50] >> 2021-10-26 08:49:04 (20201015084627)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:01 (20201102120710)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:01 (20201102133546)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:01 (20201105120328)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:02 (20201120122846)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:04 (20201123070813)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:04 (20201125155904)
[2024-02-02 09:40:50] >> 2021-10-26 08:49:04 (20201130201631)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:04 (20201207114926)
[2024-02-02 09:40:50] >> 2021-10-26 08:49:04 (20201207140911)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:04 (20201228041109)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:04 (20210104171005)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:04 (20210203143600)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:05 (20210223174702)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:05 (20210502162314)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:08 (20210520100503)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:09 (20210609191822)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:09 (20210614151138)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:09 (20210623071326)
[2024-02-02 09:40:50] >> 2022-03-20 08:42:09 (20220111202917)
[2024-02-02 09:40:50] [notice] Migrating up to Mautic\Migrations\Versionzz20230929183000
[error] Migration Mautic\Migrations\Version020230615115326 failed during Execution. Error: "An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `emails.headers` failed for `mautic`.`emails`"

In ExceptionConverter.php line 117:
                                                                                                                                                                 
  An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `emails.headers` failed for `mautic`.`emails`  
                                                                                                                                                                 

In Exception.php line 28:
                                                                                                                  
  SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `emails.headers` failed for `mautic`.`emails`  
                                                                                                                  

In Connection.php line 71:
                                                                                                                  
  SQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `emails.headers` failed for `mautic`.`emails`  
                                                                                                                  

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

```

I assume that the above issue might also be the reason my site does not load correctly?

Any ideas how i can solve this issue?

---

<div class="post-metadata">

**Author:** ![mjf777](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mjf777/32/11380_2.png) [@mjf777](https://forum.mautic.org/u/mjf777)\
**Post date:** [February 4, 2024, 6:50pm UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/2 "2024-02-04T18:50:14Z")

</div>

Same issue. Watching.

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [February 10, 2024, 3:30pm UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/3 "2024-02-10T15:30:13Z")

</div>

Any ideas @anyone ?

---

<div class="post-metadata">

**Author:** ![mduarte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mduarte/32/4223_2.png) [@mduarte](https://forum.mautic.org/u/mduarte)\
**Post date:** [February 14, 2024, 8:08pm UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/4 "2024-02-14T20:08:57Z")

</div>

This happened to me too. Could not find any solution elsewhere.

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [March 1, 2024, 3:07am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/5 "2024-03-01T03:07:28Z")

</div>

Did you somehow solve the issue?

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [March 1, 2024, 3:55am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/6 "2024-03-01T03:55:50Z")

</div>

OK, figured that part out myself now, when opening the database and going to emails and then to the column headers you will see that very old emails have the headers blank while newer once have sinde them, character [and]  
If you add those to the fields that are empty and than do the migration, then it will work.

BUT, i can into the NEXT issue then. Now it says:

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 som  
e mapping information.

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [March 1, 2024, 5:08am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/7 "2024-03-01T05:08:04Z")

</div>

OK, figured that out too, seems my database had like a duplicate inside with a different prefix. I removed those and now all migrations was successful.

BUUUUUT, when i am loading the dashboard it is still loading unendlessly.

THE PROBLEM is, that in the logs i dont get any errors, not in the apache logs and not in the mautic logs. ANY IDEAS?

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [March 1, 2024, 5:25am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/8 "2024-03-01T05:25:12Z")

</div>

Ok, my web browser does return some error in the console:

Failed to load resource: the server responded with a status of 404 (Not Found)  
[https://DOMAIN/media/libraries/ckeditor/ckeditor.js?vf12e105a](https://DOMAIN/media/libraries/ckeditor/ckeditor.js?vf12e105a)

TypeError: undefined is not an object (evaluating ‘mQuery.FroalaEditor.ENTER\_BR’)

ANY HELP HOW TO FIX THAT?

---

<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:** [March 1, 2024, 6:32am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/9 "2024-03-01T06:32:05Z")

</div>

Can you try to regenerate assets?  
`bin/console m:a:g`

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [March 1, 2024, 6:34am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/10 "2024-03-01T06:34:17Z")

</div>

> [@joeyk](#):
>
> bin/console m:a:g

When i try that it returns:

/var/www/mautic/node\_modules does not exist. Execute `npm install` to generate it.

---

<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:** [March 1, 2024, 6:35am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/11 "2024-03-01T06:35:43Z")

</div>

Well there you go 🙂 Now you know what to search for.

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [March 1, 2024, 6:43am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/12 "2024-03-01T06:43:03Z")

</div>

Thanks a lot, now i got it working.

After installing npm on my Debian, than running “npm install”, regenerating the assets and finally clearing the cache with

php bin/console cache:clear

Now it is running.  
Wow, what a journey.

---

<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:** [March 1, 2024, 7:34am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/13 "2024-03-01T07:34:15Z")

</div>

Congrats.  
I hope you read all about email transports before you upgraded.

---

<div class="post-metadata">

**Author:** ![carlosatfongo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/carlosatfongo/32/10223_2.png) [@carlosatfongo](https://forum.mautic.org/u/carlosatfongo)\
**Post date:** [March 2, 2024, 4:14am UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/14 "2024-03-02T04:14:48Z")

</div>

How did you update your Muatic version via composer?  
I tried the following:  
-Copied almost all the content from the `composer.json` from Mautic5 installation  
-Copied almost all the content from the `package.json` from Mautic5 installation  
-Copied `webpack.config.js` from Mautic5 installation  
-Copied `modernizr-config.json` from Mautic5 installation  
-Copied `tsconfig.json` from Mautic5 installation

I also ran `composer install` - `composer update` - `npm install` and even so, I got a lot of errors.

Finally, my Mautic 4.4.11 is on “docroot” but mautic 5 is not. so I’m guessing that I need to migrate the files over to make it work?

---

<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:** [March 3, 2024, 4:14pm UTC](https://forum.mautic.org/t/issues-with-migration-after-updating-from-4-4-to-5-0-2/30758/15 "2024-03-03T16:14:55Z")

</div>

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