Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Matomo
  3. SQL Error after Matomo was upgraded to v5.0

SQL Error after Matomo was upgraded to v5.0

Scheduled Pinned Locked Moved Matomo
3 Posts 2 Posters 534 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    guyds
    wrote on last edited by guyds
    #1

    My Matomo installation was automatically upgraded to v5.0.0 and as a result a database upgrade was needed upon first access.

    When I proceeded with the upgrade step, I got an Update error after several seconds:

    Critical Error during the update process:
    /app/code/core/Updates/5.0.0-b1.php: Error trying to execute the migration 'ALTER TABLE `log_visit` ADD INDEX `index_idsite_idvisitor_time` (`idsite`, `idvisitor`, `visit_last_action_time` DESC);'. The error was: SQLSTATE[42000]: Syntax error or access violation: 1178 The storage engine for the table doesn't support descending indexes
    

    Googling for the exact error didn't return anything useful, but by broadening my search I was able to narrow it down to a query incompatibility with the MyISAM engine, more specifically the "DESC" clause isn't supported.

    So to solve the issue, I opened the MySQL cli and manually performed the query without the DESC modifier, like this:

    ALTER TABLE `log_visit` ADD INDEX `index_idsite_idvisitor_time` (`idsite`, `idvisitor`, `visit_last_action_time`);
    

    Then I restarted the upgrade procedure from the web interface and everything finished successfully.

    I'm not sure if this is something that should be fixed in the Cloudron package, e.g. by upgrading to a newer MySQL version and/or switching to the InnoDB engine?

    In any case, this information might be valuable for others as well.

    Edit: fixed typo

    1 Reply Last reply
    1
    • girishG Do not disturb
      girishG Do not disturb
      girish
      Staff
      wrote on last edited by
      #2

      @guyds thanks for the info! Strangely, our matomo instance upgraded just fine and so far we haven't had any support requests about a breaking upgrade either. Let's see if someone else hits this.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        guyds
        wrote on last edited by
        #3

        @girish since I recently had another issue as well, I was just thinking that maybe all this is related to the fact that I initially migrated from an older Piwik installation.
        With that, I mean that after I installed the Cloudron app about 2 years ago, I imported existing data from that older Piwik installation. This might explain why I'm faced with those issues during upgrades while others aren't 🤔

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search