<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SQL Error after Matomo was upgraded to v5.0]]></title><description><![CDATA[<p dir="auto">My Matomo installation was automatically upgraded to v5.0.0 and as a result a database upgrade was needed upon first access.</p>
<p dir="auto">When I proceeded with the upgrade step, I got an Update error after several seconds:</p>
<pre><code>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
</code></pre>
<p dir="auto">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.</p>
<p dir="auto">So to solve the issue, I opened the MySQL cli and manually performed the query without the DESC modifier, like this:</p>
<pre><code>ALTER TABLE `log_visit` ADD INDEX `index_idsite_idvisitor_time` (`idsite`, `idvisitor`, `visit_last_action_time`);
</code></pre>
<p dir="auto">Then I restarted the upgrade procedure from the web interface and everything finished successfully.</p>
<p dir="auto">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?</p>
<p dir="auto">In any case, this information might be valuable for others as well.</p>
<p dir="auto"><em>Edit: fixed typo</em></p>
]]></description><link>https://forum.cloudron.io/topic/10789/sql-error-after-matomo-was-upgraded-to-v5-0</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 19:11:04 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/10789.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Jan 2024 16:02:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SQL Error after Matomo was upgraded to v5.0 on Fri, 05 Jan 2024 10:11:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> 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.<br />
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 <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f914.png?v=223f9defb2f" class="not-responsive emoji emoji-android emoji--thinking_face" style="height:23px;width:auto;vertical-align:middle" title=":thinking_face:" alt="🤔" /></p>
]]></description><link>https://forum.cloudron.io/post/80512</link><guid isPermaLink="true">https://forum.cloudron.io/post/80512</guid><dc:creator><![CDATA[guyds]]></dc:creator><pubDate>Fri, 05 Jan 2024 10:11:34 GMT</pubDate></item><item><title><![CDATA[Reply to SQL Error after Matomo was upgraded to v5.0 on Fri, 05 Jan 2024 09:47:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guyds" aria-label="Profile: guyds">@<bdi>guyds</bdi></a> 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.</p>
]]></description><link>https://forum.cloudron.io/post/80504</link><guid isPermaLink="true">https://forum.cloudron.io/post/80504</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Fri, 05 Jan 2024 09:47:15 GMT</pubDate></item></channel></rss>