Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with 0519 snapshot


sgflowers

Recommended Posts

Posted

Hello,

 

upgrading to cvs 0519

 

I have an issue with the 0519 snapshot as ther is a primary index on the

address_book_id in the adress_book table when i try to change it so that the indexes match it i get an error

 

here is the index currently:

 

Keyname Type Cardinality Action Field

PRIMARY PRIMARY 522 Drop Edit address_book_id

customers_id

idx_address_book_customers_id INDEX 522 Drop Edit customers_id

 

 

error:

 

ALTER TABLE `address_book` DROP PRIMARY KEY ,

ADD PRIMARY KEY ( `address_book_id` )

 

MySQL said:

 

 

Duplicate entry '1' for key 1

 

can anyone help i am trying to use phpmyadmin to match the latest cvs i think it is because it switched between address_book_id being autoincrement and not

 

but my knowledge of how indexes work is very limited

Posted
# Table structure for table `address_book`

#

 

 

CREATE TABLE address_book (

customers_id int(11) NOT NULL default '0',

address_book_id int(11) NOT NULL default '1',

entry_gender char(1) NOT NULL default '',

entry_company varchar(32) default NULL,

entry_firstname varchar(32) NOT NULL default '',

entry_lastname varchar(32) NOT NULL default '',

entry_street_address varchar(64) NOT NULL default '',

entry_suburb varchar(32) default NULL,

entry_postcode varchar(10) NOT NULL default '',

entry_city varchar(32) NOT NULL default '',

entry_state varchar(32) default NULL,

entry_country_id int(11) NOT NULL default '0',

entry_zone_id int(11) NOT NULL default '0',

PRIMARY KEY (address_book_id,customers_id),

KEY idx_address_book_customers_id (customers_id)

) TYPE=MyISAM;

 

can anyone help i am trying to make it match the cvs for 0519 but i keep getting errors

Posted

is there any way to update this using a script i have like 400+ address that each need there own unique ids i guess what other tables are impacted?

Posted

i don't understand the relations ship between:

 

customers_default_address_id (table customers)

 

and

 

address_book_id (table address_book)

 

if the address_book_id has the be unique (auto-increment primary index)

what is the customer_default_address_id

Posted

There is an update script available in the extras/pr21_to_pr22 directory.

 

An update to the table is needed due to the My Account proposal realization.

:heart:, osCommerce

Posted

ouch i had go through the customer`s table and manually renumber the default address id as all address ids are unique in the address_book table (autoincrement)

 

thanks for the help

 

- Kevin

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...