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

bestcons

I feel sorry if I have upset you. I have not lost any interest, in fact I am a real beginner so I fully rely on this Forum.
As indicated, I imported your sql file but received the indicated error (see attachment).
And now I have no idea how to proceed as I just miss the knowledge to draw conclusions from the error message.
Thank you.

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

bestcons

I am very reluctant to answer your question, again I am not an expert at all.
I have attached to my best understanding the answer (LEEG means EMPTY). So 8 entries are in use, 4 are empty.

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

bestcons

Got it.
See the attached 2 screenprints (let me know if you need more detailed images)

GJC Web Design

so there are entries there .. then out of ideas  - you need someone to take a look at this...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

bestcons

Out of ideas....I was that already from the moment I presented the problem on this forum  :(
Anyhow, thanks for all the efforts you made. Hopefully someone else still has a good idea  ;).

jjk

Ok, here are my stupid ideas :-)

In the file j30_virtuemart_adminmenuentries.sql which GJC sent you, line 52 begins with INSERT INTO `j30_virtuemart_adminmenuentries...
I assume that if you change that to REPLACE INTO `j30_virtuemart_adminmenuentries..., you might not get the error message 1062 duplicate enty '1' for key 'primary' when importing it.

If that doesn't work, what happens if you simply install the latestest VM 3.0.4 over your existing one?
Another idea is to select the database in phpmyadmin, scroll down to the bottom and check all tables and click 'with selected' > Repair table (and afterwards perhaps also check table and optimize table)

Last but not least you can try to go to your VirtueMart Tools & Migration view and click 'Install or if necessary update tables'
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

bestcons

Your first proposal to change INSERT INTO into REPLACE INTO worked perfectly. No error. So not a stupid idea at all.
Than I tried to install VM 3.0.4 but still the following error: 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` Remember that I deleted the table product_price_vdate as was suggested earlier.
I followed also your suggestions to repair the tables. The Tools & Migration gave the same error and PHPMyadmin did not detect any error.
Your other suggestion to install the latest VM 3.0.4 over the existing one is unclear to me. I thought that I tried to do this. Apparently you have a different approach in mind. Can you be more specific?

jjk

Quote from: bestcons on February 03, 2015, 20:01:03 PM
Your other suggestion to install the latest VM 3.0.4 over the existing one is unclear to me. I thought that I tried to do this. Apparently you have a different approach in mind. Can you be more specific?

My thought was that the installer script might skip the table change after you did the small manual clean up. Apparently the idea didn't work.

You don't actually have a duplicate column name product_price_publish_up in your table, do you?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

bestcons


jjk

Well, I definitely don't have the column product_price_edate in my database table. That's another one from VM1 and early VM2 versions. I would delete that one, too.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

bestcons

Unfortunately still the same error: 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`
Attached the new table.

Jörgen

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

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

bestcons

Hi Jörgen,
I am not an expert at all, it's just that I copy the error message I get, trying to upgrade VM 3.0.2 to 3.0.4. Both moderators advised me to delete the column `product_price_vdate`