Critical error while update 0.5

hi forum,

i tried to update my piwik from <=0.2.x to 0.5
After uploading the new files an starting the upgrade i get the following message:

Kritischer Fehler während dem Upgrade-Prozess:

/home/www/…/core/Updates/0.4.1.php:
Error trying to execute the query ‘ALTER TABLE piwik_log_conversion
CHANGE idaction idaction INT(11) DEFAULT NULL’.
The error was: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘idaction’ in ‘piwik_log_conversion’

some ideas?

thx andy

The log_conversion table was added in 0.2.27. There weren’t any schema changes to that table until 0.4.1, so it’s a bit of a mystery why you’re getting this error.

Using some MySQL client, can you query the table structure? e.g., “describe piwik_log_conversion;”

Hello,

I got exactly the same error.

Version: I could not find it but it was the “last.zip” version fetched on 2008/08/20
This one was already an upgrade from an initial install of “last.zip” from 2008/04/20

/var/www/piwik/core/Updates/0.4.1.php:
Error trying to execute the query ‘ALTER TABLE piwik_log_conversion
CHANGE idaction idaction INT(11) DEFAULT NULL’.
The error was: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘idaction’ in ‘piwik_log_conversion’

mysql> describe piwik_log_conversion;
±--------------------------±-----------------±-----±----±--------±------+
| Field | Type | Null | Key | Default | Extra |
±--------------------------±-----------------±-----±----±--------±------+
| idvisit | int(10) unsigned | NO | PRI | NULL | |
| idsite | int(10) unsigned | NO | MUL | NULL | |
| visitor_idcookie | char(32) | NO | | NULL | |
| server_time | datetime | NO | | NULL | |
| visit_server_date | date | NO | | NULL | |
| idaction_url | int(11) | YES | | NULL | |
| idlink_va | int(11) | YES | | NULL | |
| referer_idvisit | int(10) unsigned | YES | | NULL | |
| referer_visit_server_date | date | YES | | NULL | |
| referer_type | int(10) unsigned | YES | | NULL | |
| referer_name | varchar(70) | YES | | NULL | |
| referer_keyword | varchar(255) | YES | | NULL | |
| visitor_returning | tinyint(1) | NO | | NULL | |
| location_country | char(3) | NO | | NULL | |
| location_continent | char(3) | NO | | NULL | |
| url | text | NO | | NULL | |
| idgoal | int(10) unsigned | NO | PRI | NULL | |
| revenue | float | YES | | NULL | |
±--------------------------±-----------------±-----±----±--------±------+
18 rows in set (0.00 sec)

How could I fix my database schema?
Thanks!

You can either edit core/Updates/0.4.1.php, changing:

'ALTER TABLE `'. Piwik::prefixTable('log_conversion') .'`
                CHANGE `idaction` `idaction` INT(11) DEFAULT NULL' => false,

to:

'ALTER TABLE `'. Piwik::prefixTable('log_conversion') .'`
                CHANGE `idaction` `idaction` INT(11) DEFAULT NULL' => '1054',

Or run this MySQL query (assuming you’re using the ‘piwik_’ prefix for your tables):

update piwik_option set option_value = '0.4.1' where option_name = 'version_core';

Thanks, update of the tables could be done without further error but now piwik dashboard complains about several unknown widgets and on some pages I get errors like

SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘visit_goal_converted’ in ‘field list’

I think I’ll drop my stats and start over from scratch…