Werenât you already running PHP 7.3 though? In any case, the upgrade script will bail out if your PHP version is too low, before it does anything. So you need to do that first.
Then run:
php upgrade_v3.php
and get the SQL syntax error.
At this point you can (and probably should!) try the migration again:
php bin/console doctrine:migration:migrate
but for me, it failed with the same error.
So then I ran the two SQL statements:
ALTER TABLE email_stats ADD generated_sent_date DATE AS (CONCAT(YEAR(date_sent), "-", LPAD(MONTH(date_sent), 2, "0
"), "-", LPAD(DAY(date_sent), 2, "0"))) COMMENT '(DC2Type:generated)';
ALTER TABLE email_stats ADD INDEX `generated_sent_date_email_id`(generated_sent_date, email_id);
And finally tried the migrations again:
php bin/console doctrine:migration:migrate
This time it succeeded and I was running Mautic 3.2.4.
(There were a bunch of warnings about unknown registered migrations, going back to 2015 or something; I forget the exact message. To the best of my understanding, they are harmless.)
Remember to update your cron jobs to use bin/console
instead of app/console
at this point!
There are some steps after the database migration, which probably didnât get executed in my case, most notably ârestore user dataâ. Regardless, it seems I ended up with a working installation, including plugins and themes. Maybe the subsequent update to 3.3.3, which I performed immediately after, has taken care of that.