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?
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>]