News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Upgrade 3.02 to 3.04 Error1060 Duplicate column name 'product_price_publish_up'

Started by bestcons, February 01, 2015, 11:19:38 AM

Previous topic - Next topic

Jörgen

Hello bestcons

I missed that you deleted that column, sorry. But I interpretet the command that both of the two columns should only be changing their type, not replacing each other. Anyway I can´t find any documentation for the command CHANGE COLUMN to make a correct assessment. Just guessing here.  :-\

regards

Jörgen @ Kreativ Fotografi

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

Bestcons, what is the problem, the thing is actually not hard.

There is a table which got broken for whatever reason. Delete all columns of your price table, like vdate and edate. Then use the table updater again and done. The tableupdater should do it for you.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bestcons

Hi Milbo, with phpmyadmin I could not delete all columns, rather had to drop the table. So I left the first column and deleted the rest.
Then I used the Virtuemart updater (install table or if necessary update) but still get the same error message: 1060 Duplicate column name 'product_price_publish_up' SQL=ALTER TABLE `j30_virtuemart_product_prices` CHANGE COLUMN `product_price_vdate` `product_price_publish_up` DATETIME NULL DEFAULT NULL AFTER `product_currency`
Should I drop the virtuemart_product_prices table?

Milbo

I wonder if you work on the right db, or on the tables with the correct PREFIX
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bestcons

Hi Milbo,

Your guess was absolutely right. Did not change the story, but after deleting almost completely the product_prices table I now could use the updater to correct this. And... the update was succesful. I'm now on VM 3.0.4
Thanks guys  :)  :).

gmcfuerte

Is' nt the # missing?
Quote from: Jörgen on February 04, 2015, 08:03:30 AM
Hello :)

I may be out on thin ice here, but is this really correct SQL?

QuoteSQL=ALTER TABLE `j30_virtuemart_product_prices` CHANGE COLUMN `product_price_vdate` `product_price_publish_up` DATETIME NULL DEFAULT NULL AFTER `product_currency`

Should it not be?
QuoteSQL=ALTER TABLE `j30_virtuemart_product_prices` MODIFY COLUMN `product_price_vdate` `product_price_publish_up` DATETIME NULL DEFAULT NULL AFTER `product_currency`

or maybe ?
QuoteSQL=ALTER TABLE `j30_virtuemart_product_prices` ALTER COLUMN `product_price_vdate` `product_price_publish_up` DATETIME NULL DEFAULT NULL AFTER `product_currency`

and why is column `product_price_vdate` missing ?

I am absolutely no SQL expert so please forgive me if I am wrong about this, but I can´t find any documentation that describes CHANGE COLUMN.

best regards

Jörgen @ Kreativ Fotografi

gmcfuerte

I got this in the frontend:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR `virtuemart_shoppergroup_id` IS NULL OR `virtuemart_shoppergroup_id`="0") AN' at line 1 SQL=SELECT * FROM `u27qw_virtuemart_product_prices` WHERE `virtuemart_product_id` = "44" AND ( OR `virtuemart_shoppergroup_id` IS NULL OR `virtuemart_shoppergroup_id`="0") AND ( (`product_price_publish_up` IS NULL OR `product_price_publish_up` = "0000-00-00 00:00:00" OR `product_price_publish_up` <= "2015-02-17 14:54:48" ) AND (`product_price_publish_down` IS NULL OR `product_price_publish_down` = "0000-00-00 00:00:00" OR product_price_publish_down >= "2015-02-17 14:54:48" ) ) ORDER BY `product_price` DESC

gmcfuerte

It is possible to have the 3.0.3 version and try that first?
is there a working 3.0.5 to upgrade?
Please HELP!!!!

bestcons

It seems to me that this is a different problem. My problem has been fully solved.
I suggest that you open a new lead, to ask for support.

Milbo

gmcfuerte, your problem is solved by updating to vm3.0.6. But you should check your shoppergroups, maybe you miss a default one.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/