The database upgrade fails when trying to update Matomo from 4.1.1 to 4.2.0 with the following error.
$ sudo -u www-data php /var/www/html/console core:update
...
*** Update ***
Database Upgrade Required
Your Matomo database is out-of-date, and must be upgraded before you can continue.
Matomo database will be upgraded from version 4.1.1 to the new version 4.2.0.
The database upgrade process may take a while, so please be patient.
Executing ... DEBUG [2021-02-23 15:46:57] 25510 General tracker cache was re-created.
DEBUG [2021-02-23 15:46:57] 25510 General tracker cache was re-created.
[X] Critical Error during the update process:
* /var/www/html/core/Updates/4.1.2-b1.php:
Error trying to execute the migration ''.
The error was: The date '-0001-11-30' is a date before first website was online. Try date that's after Aug 6, 1991 (timestamp 681436800).: -62169984000
Running the database upgrade script should finish successfully or provide manual steps on how to make it run successfully.
Database upgrade fails and leaves Matomo in an unusable state.
Hi @aldafu,
Can you try out applying the changes from https://github.com/matomo-org/matomo/pull/17254 and report back if the update goes through afterwards?
Confirming, that this change allowed the upgrade script to finish successfully and the web dashboard can be opened again.
This issue has been mentioned on Matomo forums. There might be relevant details there:
https://forum.matomo.org/t/no-data-report-since-last-friday-data-archiving-fails/48682/1