The following queries were executed
uc_flatrate module
Update #6000

* ALTER TABLE {uc_flatrate_products} DROP PRIMARY KEY
* ALTER TABLE {uc_flatrate_products} CHANGE vid `vid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_flatrate_products} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_flatrate_products} CHANGE mid `mid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_flatrate_products} ADD PRIMARY KEY (vid, mid)
* Failed: ALTER TABLE {uc_flatrate_methods} DROP PRIMARY KEY
* Failed: ALTER TABLE {uc_flatrate_methods} CHANGE mid `mid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (mid)

uc_quote module
Update #6000

* ALTER TABLE {uc_quote_shipping_types} DROP PRIMARY KEY
* ALTER TABLE {uc_quote_shipping_types} CHANGE id `id` INT unsigned NOT NULL DEFAULT 0, ADD PRIMARY KEY (id_type, id)
* ALTER TABLE {uc_quote_manufacturer_locations} DROP PRIMARY KEY
* ALTER TABLE {uc_quote_manufacturer_locations} CHANGE tid `tid` INT unsigned NOT NULL DEFAULT 0, ADD PRIMARY KEY (tid)
* ALTER TABLE {uc_quote_product_locations} DROP PRIMARY KEY
* ALTER TABLE {uc_quote_product_locations} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0, ADD PRIMARY KEY (nid)
* ALTER TABLE {uc_order_quotes} DROP KEY oid_quote_method
* ALTER TABLE {uc_order_quotes} CHANGE oid `order_id` INT unsigned NOT NULL DEFAULT 0, ADD UNIQUE KEY order_id_quote_method (order_id, method)

uc_attribute module
Update #6000

* ALTER TABLE {uc_attributes} CHANGE aid `aid` INT unsigned NOT NULL auto_increment
* ALTER TABLE {uc_attributes} CHANGE required `required` TINYINT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_attributes} CHANGE display `display` TINYINT unsigned NOT NULL DEFAULT 1
* ALTER TABLE {uc_attribute_options} CHANGE aid `aid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_attribute_options} CHANGE oid `oid` INT unsigned NOT NULL auto_increment
* ALTER TABLE {uc_class_attributes} DROP PRIMARY KEY
* ALTER TABLE {uc_class_attributes} CHANGE aid `aid` INT unsigned NOT NULL DEFAULT 0, ADD PRIMARY KEY (pcid, aid)
* ALTER TABLE {uc_class_attributes} CHANGE default_option `default_option` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_class_attributes} CHANGE required `required` TINYINT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_class_attributes} CHANGE display `display` TINYINT unsigned NOT NULL DEFAULT 1
* ALTER TABLE {uc_class_attribute_options} DROP PRIMARY KEY
* ALTER TABLE {uc_class_attribute_options} CHANGE oid `oid` INT unsigned NOT NULL DEFAULT 0, ADD PRIMARY KEY (pcid, oid)
* ALTER TABLE {uc_product_attributes} DROP PRIMARY KEY
* ALTER TABLE {uc_product_attributes} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_product_attributes} CHANGE aid `aid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_product_attributes} CHANGE default_option `default_option` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_product_attributes} CHANGE required `required` TINYINT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_product_attributes} CHANGE display `display` TINYINT unsigned NOT NULL DEFAULT 1
* ALTER TABLE {uc_product_attributes} ADD PRIMARY KEY (nid, aid)
* ALTER TABLE {uc_product_options} DROP PRIMARY KEY
* ALTER TABLE {uc_product_options} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_product_options} CHANGE oid `oid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_product_options} ADD PRIMARY KEY (nid, oid)
* Failed: ALTER TABLE {uc_product_adjustments} DROP PRIMARY KEY
* ALTER TABLE {uc_product_adjustments} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0, ADD INDEX nid (nid)

uc_cart module
Update #6000

* ALTER TABLE {uc_cart_products} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_cart_products} CHANGE qty `qty` SMALLINT unsigned NOT NULL DEFAULT 0

uc_order module
Update #6000

* Failed: ALTER TABLE {uc_orders} DROP PRIMARY KEY
* Failed: ALTER TABLE {uc_orders} DROP INDEX uid
* Failed: ALTER TABLE {uc_orders} CHANGE order_id `order_id` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (order_id)
* ALTER TABLE {uc_orders} CHANGE uid `uid` INT unsigned NOT NULL DEFAULT 0, ADD INDEX uid (uid)
* ALTER TABLE {uc_orders} CHANGE delivery_first_name `delivery_first_name` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE delivery_last_name `delivery_last_name` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE delivery_phone `delivery_phone` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE delivery_company `delivery_company` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE delivery_street1 `delivery_street1` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE delivery_street2 `delivery_street2` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE delivery_city `delivery_city` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE delivery_zone `delivery_zone` MEDIUMINT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_orders} CHANGE delivery_postal_code `delivery_postal_code` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE delivery_country `delivery_country` MEDIUMINT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_orders} CHANGE billing_first_name `billing_first_name` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE billing_last_name `billing_last_name` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE billing_phone `billing_phone` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE billing_company `billing_company` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE billing_street1 `billing_street1` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE billing_street2 `billing_street2` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE billing_city `billing_city` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE billing_zone `billing_zone` MEDIUMINT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_orders} CHANGE billing_postal_code `billing_postal_code` VARCHAR(255) NOT NULL DEFAULT ''
* ALTER TABLE {uc_orders} CHANGE billing_country `billing_country` MEDIUMINT unsigned NOT NULL DEFAULT 0
* Failed: ALTER TABLE {uc_order_admin_comments} DROP INDEX order_id
* ALTER TABLE {uc_order_admin_comments} CHANGE comment_id `comment_id` INT unsigned NOT NULL auto_increment
* ALTER TABLE {uc_order_admin_comments} CHANGE order_id `order_id` INT unsigned NOT NULL DEFAULT 0, ADD INDEX order_id (order_id)
* ALTER TABLE {uc_order_admin_comments} CHANGE uid `uid` INT unsigned NOT NULL DEFAULT 0
* Failed: ALTER TABLE {uc_order_comments} DROP INDEX order_id
* ALTER TABLE {uc_order_comments} CHANGE comment_id `comment_id` INT unsigned NOT NULL auto_increment
* ALTER TABLE {uc_order_comments} CHANGE order_id `order_id` INT unsigned NOT NULL DEFAULT 0, ADD INDEX order_id (order_id)
* ALTER TABLE {uc_order_comments} CHANGE uid `uid` INT unsigned NOT NULL DEFAULT 0
* Failed: ALTER TABLE {uc_order_line_items} DROP INDEX order_id
* ALTER TABLE {uc_order_line_items} CHANGE line_item_id `line_item_id` INT unsigned NOT NULL auto_increment
* ALTER TABLE {uc_order_line_items} CHANGE order_id `order_id` INT unsigned NOT NULL DEFAULT 0, ADD INDEX order_id (order_id)
* Failed: ALTER TABLE {uc_order_log} DROP INDEX order_id
* ALTER TABLE {uc_order_log} CHANGE order_log_id `order_log_id` INT unsigned NOT NULL auto_increment
* ALTER TABLE {uc_order_log} CHANGE order_id `order_id` INT unsigned NOT NULL DEFAULT 0, ADD INDEX order_id (order_id)
* ALTER TABLE {uc_order_log} CHANGE uid `uid` INT unsigned NOT NULL DEFAULT 0
* Failed: ALTER TABLE {uc_order_products} DROP INDEX order_id
* ALTER TABLE {uc_order_products} CHANGE order_product_id `order_product_id` INT unsigned NOT NULL auto_increment
* ALTER TABLE {uc_order_products} CHANGE order_id `order_id` INT unsigned NOT NULL DEFAULT 0, ADD INDEX order_id (order_id)
* ALTER TABLE {uc_order_products} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_order_products} CHANGE qty `qty` SMALLINT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_order_products} CHANGE cost `cost` DECIMAL unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_order_products} CHANGE price `price` DECIMAL unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_order_products} CHANGE weight `weight` FLOAT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_order_statuses} CHANGE weight `weight` SMALLINT NOT NULL DEFAULT 0
* ALTER TABLE {uc_order_statuses} CHANGE locked `locked` TINYINT unsigned NOT NULL DEFAULT 0

uc_product module
Update #6000

* Failed: ALTER TABLE {uc_product_features} DROP PRIMARY KEY
* Failed: ALTER TABLE {uc_product_features} DROP INDEX nid
* Failed: ALTER TABLE {uc_product_features} CHANGE pfid `pfid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (pfid)
* ALTER TABLE {uc_product_features} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0, ADD INDEX nid (nid)
* ALTER TABLE {uc_products} DROP PRIMARY KEY
* ALTER TABLE {uc_products} CHANGE vid `vid` INT unsigned NOT NULL DEFAULT 0, ADD PRIMARY KEY (vid)
* ALTER TABLE {uc_products} CHANGE nid `nid` INT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_products} CHANGE list_price `list_price` DECIMAL unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_products} CHANGE cost `cost` DECIMAL unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_products} CHANGE sell_price `sell_price` DECIMAL unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_products} CHANGE weight `weight` FLOAT unsigned NOT NULL DEFAULT 0
* ALTER TABLE {uc_products} CHANGE unique_hash `unique_hash` VARCHAR(32) NOT NULL DEFAULT 'd41d8cd98f00b204e9800998ecf8427e'
* ALTER TABLE {uc_products} CHANGE shippable `shippable` TINYINT unsigned NOT NULL DEFAULT 1

uc_store module
Update #6000

* Failed: ALTER TABLE {uc_countries} DROP PRIMARY KEY
* Failed: ALTER TABLE {uc_countries} CHANGE country_id `country_id` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (country_id)
* Failed: ALTER TABLE {uc_zones} DROP PRIMARY KEY
* Failed: ALTER TABLE {uc_zones} DROP INDEX zone_country_id
* Failed: ALTER TABLE {uc_zones} CHANGE zone_id `zone_id` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (zone_id)
* ALTER TABLE {uc_zones} CHANGE zone_country_id `zone_country_id` INT unsigned NOT NULL DEFAULT 0, ADD INDEX zone_country_id (zone_country_id)

Comments

zet’s picture

And the errors of the page :

* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE uc_flatrate_methods DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Multiple primary key defined query: ALTER TABLE uc_flatrate_methods CHANGE mid `mid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (mid) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Can't DROP 'PRIMARY'; check that column/key exists query: ALTER TABLE uc_product_adjustments DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE uc_orders DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Can't DROP 'uid'; check that column/key exists query: ALTER TABLE uc_orders DROP INDEX uid in /var/www/html/drupal6/includes/database.mysql-common.inc on line 448.
* user warning: Multiple primary key defined query: ALTER TABLE uc_orders CHANGE order_id `order_id` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (order_id) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Can't DROP 'order_id'; check that column/key exists query: ALTER TABLE uc_order_admin_comments DROP INDEX order_id in /var/www/html/drupal6/includes/database.mysql-common.inc on line 448.
* user warning: Can't DROP 'order_id'; check that column/key exists query: ALTER TABLE uc_order_comments DROP INDEX order_id in /var/www/html/drupal6/includes/database.mysql-common.inc on line 448.
* user warning: Can't DROP 'order_id'; check that column/key exists query: ALTER TABLE uc_order_line_items DROP INDEX order_id in /var/www/html/drupal6/includes/database.mysql-common.inc on line 448.
* user warning: Can't DROP 'order_id'; check that column/key exists query: ALTER TABLE uc_order_log DROP INDEX order_id in /var/www/html/drupal6/includes/database.mysql-common.inc on line 448.
* user warning: Can't DROP 'order_id'; check that column/key exists query: ALTER TABLE uc_order_products DROP INDEX order_id in /var/www/html/drupal6/includes/database.mysql-common.inc on line 448.
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE uc_product_features DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Can't DROP 'nid'; check that column/key exists query: ALTER TABLE uc_product_features DROP INDEX nid in /var/www/html/drupal6/includes/database.mysql-common.inc on line 448.
* user warning: Multiple primary key defined query: ALTER TABLE uc_product_features CHANGE pfid `pfid` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (pfid) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE uc_countries DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Multiple primary key defined query: ALTER TABLE uc_countries CHANGE country_id `country_id` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (country_id) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE uc_zones DROP PRIMARY KEY in /var/www/html/drupal6/includes/database.mysql-common.inc on line 386.
* user warning: Can't DROP 'zone_country_id'; check that column/key exists query: ALTER TABLE uc_zones DROP INDEX zone_country_id in /var/www/html/drupal6/includes/database.mysql-common.inc on line 448.
* user warning: Multiple primary key defined query: ALTER TABLE uc_zones CHANGE zone_id `zone_id` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (zone_id) in /var/www/html/drupal6/includes/database.mysql-common.inc on line 520.

rondp’s picture

My results are different in detail yet very similar in structure (same sorts of error messages, on different tables).

Island Usurper’s picture

Title: After update.php » Primary key errors after update.php (update 6000)
Assigned: Unassigned » Island Usurper
Status: Active » Closed (won't fix)

So yeah, big mistake on my part. But I don't think it's going to hurt anything. These updates were meant for the upgrade from Drupal 5 to Drupal 6, but since I forgot about all the sites already using Ubercart on D6, these updates get run as well.

The failed queries shouldn't matter if the database matches the schema, which it should from clean installs. If these are from upgrades, though, I'll reopen the issue.

jantoine’s picture

Version: 6.x-2.x-dev » 6.x-2.0-rc1

I received this one "user warning" when updating from Ubercart 5.x-1.7 to Ubercart 6.x-2.0-rc1

user warning: Duplicate entry '1737' for key 1 query: ALTER TABLE uc_zones CHANGE zone_id `zone_id` INT unsigned NOT NULL auto_increment, ADD PRIMARY KEY (zone_id)

I don't believe it is a critical issue, but thought I would put it out there in case others get the same error.

Cheers,

Antoine