Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE[42S22] when upgrade to matomo 4 #16998

Closed
lds-lds opened this issue Dec 22, 2020 · 2 comments
Closed

SQLSTATE[42S22] when upgrade to matomo 4 #16998

lds-lds opened this issue Dec 22, 2020 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it. Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data

Comments

@lds-lds
Copy link

lds-lds commented Dec 22, 2020

Hello

I just tried to update matomo this morning from 3.14.1 to version 4.0 and I get this error when I run php /home/matomo/www/matomo/console core:update

   [X] Critical Error during the update process:

    * /home/matomo/www/matomo/core/Updates/4.0.0-b1.php:
    Error trying to execute the migration 'UPDATE piwik_log_visit SET visitor_seconds_since_first = visitor_days_since_first * 86400, 
                        visitor_seconds_since_order = visitor_days_since_order * 86400,
                        visitor_seconds_since_last = visitor_days_since_last * 86400;'.
    The error was: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'visitor_days_since_first' in 'field list'

    The above is the core error message. It should help explain the cause, but if you require further help please:

    * Check the [ Matomo FAQ ] which explains most common errors during update. 
    * Ask your system administrator - they may be able to help you with the error which is most likely related to your server or MySQL setup.

    If you are an advanced user and encounter an error in the database upgrade:

    * identify and correct the source of the problem (e.g., memory_limit or max_execution_time)
    * execute the remaining queries in the update that failed
    * manually update the `option` table in your Matomo database, setting the value of version_core to the version of the failed update
    * re-run the updater (through the browser or command-line) to continue with the remaining updates
    * report the problem (and solution) so that Matomo can be improved
ERROR [2020-12-22 10:27:32] 1671  Uncaught exception: /home/matomo/www/matomo/plugins/CoreUpdater/Commands/Update.php(255): Matomo could not be updated! See above for more information.
Matomo could not be updated! See above for more information.

@tsteur
Copy link
Member

tsteur commented Dec 22, 2020

Hi @lds-lds could you let us maybe know how you upgraded? Through the UI and the one click update?

Any chance the core:update command was executed twice running in parallel somehow?

It should work if you try to execute the core:update command again. could you give this a try if you haven't already?

@tsteur tsteur added the Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data label Dec 22, 2020
@lds-lds
Copy link
Author

lds-lds commented Dec 28, 2020

you are right I had to throw the ugrade twice in parallel
Thank you :)

@lds-lds lds-lds closed this as completed Dec 28, 2020
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. Can't reproduce (yet) For issues that are reported by several people, but can't be reproduced reliably and need more data
Projects
None yet
Development

No branches or pull requests

3 participants