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

bestcons

The site is on Joomla 3.3.6
This morning I tried to install VM 3.0.4 This failed with the 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`
The system configuration however shows now 3.0.4

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


GJC Web Design

you need to look at your j30_virtuemart_product_prices table carefully.. has it already got a column product_price_publish_up?
(I assume so)

because it is trying to change column name product_price_vdate to product_price_publish_up

but very strange as product_price_vdate is a column in a VM1.1. prices table...

it comes from the public function update() in administrator\components\com_virtuemart\install\script.virtuemart.php

$this->alterTable('#__virtuemart_product_prices',
            array(
            'product_price_vdate' => '`product_price_publish_up` DATETIME NULL DEFAULT NULL AFTER `product_currency`',
            'product_price_edate' => '`product_price_publish_down` DATETIME NULL DEFAULT NULL AFTER `product_price_publish_up`'
         ));

but runs only if you fail $this->checkIfUpdate()

this is a check for

SELECT count(id) AS idCount FROM `#__virtuemart_adminmenuentries

have you got this table?
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

Milbo

Thank you GJC,
Furthermore it checks if the product_price_vdate is there. So I would just delete the old product_price_vdate column in the table.
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

In the database I find the following VM tables:
j25_virtuemart_product_prices, including the columns product_price_publish_up and product_price_vdate, value NULL
j30_virtuemart_product_prices, including the columns product_price_publish_up and product_price_vdate, value NULL
jos30_virtuemart_product_prices, empty
jos_virtuemart_product_prices, empty

GJC Web Design

Boy - what a mess - should only be one table j30_virtuemart_product_prices with no product_price_vdate field  (if j30 is your live prefix your working with)
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

Cleaned up the mess by deleting the old tables and deleted the product_price_vdate column.
Still the same 1060 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`

GJC Web Design

because you've already got both columns in j30_virtuemart_product_prices - you shouldn't !

remove the one without data in it - if both have data remove one or other till it works -- backup obviously
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

There is only 1 column with product_prices_publish_up, see attached printscreen.

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


GJC Web Design

so that table is empty?  I really wonder how your DB got in this mess?

try importing the attached
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

MySQL reports: #1062 - Duplicate entry '1' for key 'PRIMARY'

GJC Web Design

would you provide more info or I will loose interest -- if that is so then there are entries already in there!
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