Upgrade from 3.0.8 to 3.0.9 aborts with error: VM is now really upgraded or not?

Started by SteP[IT], May 07, 2015, 08:33:54 AM

Previous topic - Next topic

SteP[IT]

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?
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

SteP[IT]

Ubuntu 3.13.0-52
MYSqsl database    5.5.43
PHP    5.5.24
Apache 2.4.12
Joomla! 3.4.1
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

SteP[IT]

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
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it

SteP[IT]

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.
J 3.9.2 - VM 3.4.3

MMC EDIZIONI - Italian High-Quality PaperBooks Publisher
Site: https://www.mmcedizioni.it