VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: SteP[IT] on May 07, 2015, 08:33:54 AM

Title: Upgrade from 3.0.8 to 3.0.9 aborts with error: VM is now really upgraded or not?
Post by: SteP[IT] on May 07, 2015, 08:33:54 AM
Tried to upgrade from 3.0.8 to 3.0.9 (J 3.4.1): the installation ends with this alert:

Incorrect table definition; there can be only one auto column and it must be defined as a key SQL=ALTER TABLE `j3vm3mmc_virtuemart_adminmenuentries` CHANGE COLUMN `id` `id` TINYINT(1) UNSIGNED NOT NULL AUTO_INCREMENT FIRST

There is also a Joomla ERROR message saying that there is an error in installing the component.

The VM serial is now updated to 3.0.9 (on the left VM bar): in this situation, is the VM component correctly upgraded or not?
Title: Re: Upgrade from 3.0.8 to 3.0.9 aborts with error: VM is now really upgraded or not?
Post by: Milbo on May 07, 2015, 13:49:11 PM
server and mysql version could help
Title: Re: Upgrade from 3.0.8 to 3.0.9 aborts with error: VM is now really upgraded or not?
Post by: SteP[IT] on May 07, 2015, 14:25:37 PM
Ubuntu 3.13.0-52
MYSqsl database    5.5.43
PHP    5.5.24
Apache 2.4.12
Joomla! 3.4.1
Title: Re: Upgrade from 3.0.8 to 3.0.9 aborts with error: VM is now really upgraded or not?
Post by: Milbo on May 07, 2015, 16:57:04 PM
btw, the updater is working line by line, so it should be updated. And the error, we dont understand it,

somehow the tableupdater means that the existing line ist NOT
`id` tinyint(1) unsigned NOT NULL AUTO_INCREMENT,

and tries then to update it with the same value as it is already.
Title: Re: Upgrade from 3.0.8 to 3.0.9 aborts with error: VM is now really upgraded or not?
Post by: SteP[IT] on June 12, 2015, 17:08:28 PM
I had this same problem again, updating VM from 3.0.9 to 3.0.9.4.

I have identified the cause: it seem that the table to be updated DOES NOT HAVE THE COLUMN TO BE UPDATED defined as PRIMARY KEY.
I have also found that in my VM db, all tables don't have a PRIMARY KEY anymore!

for example, the 'module_id'  column in '___virtuemart_modules' table is currently defined in this way:

Name: module_id
Type: INT
Lenght: 1
Predefined as: 0
Attributes: unsigned

After manually changing it to become PRIMARY KEY, I re-installed the VM update: as result,  the column is correctly updated, the updater gives the confirmation "Table updated: Tablename j3vm3mmc_virtuemart_categories dropped: 0 altered: 1 added: 0" and than it shows the same error for the next VM table.

In conclusion, to pass the installation without issues I have to manually set all "xxx_id" columns as PRIMARY KEY

It seems that my current VM3 db has NO MORE primary keys... but it comes from previous VM2.x - VM3.x upgrades, no manual mods has been made before... Any hint on that?
No one having this problem?

Thank you in advance
Title: Re: Upgrade from 3.0.8 to 3.0.9 aborts with error: VM is now really upgraded or not?
Post by: SteP[IT] on June 12, 2015, 18:45:36 PM
OK, solved: simply picked up a previoulsy working db, and made the upgrade.
It worked with no issues. I've not been able to reproduce the situation that has disrupted the Primary Key in each table, but it happend.
Now it works again as expected.