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?
server and mysql version could help
Ubuntu 3.13.0-52
MYSqsl database 5.5.43
PHP 5.5.24
Apache 2.4.12
Joomla! 3.4.1
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.
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
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.