Description:
Error when loading store.mysql database scheme:
SQL-query:
-- --------------------------------------------------------
--
-- Table structure for table `ec_transaction_product`
--
CREATE TABLE ec_transaction_product(
txnid int( 10 ) unsigned NOT NULL default '0',
nid int( 10 ) unsigned NOT NULL default '0',
title varchar( 128 ) default NULL ,
price decimal( 10, 2 ) NOT NULL default '0.00',
qty int( 10 ) unsigned NOT NULL default '0',
expires int( 11 ) unsigned NOT NULL default '0',
product_data text,
is_recurring tinyint( 3 ) unsigned NOT NULL default '0',
price_interval tinyint( 3 ) unsigned NOT NULL default '0',
price_unit varchar( 5 ) NOT NULL default '',
price_cycle int( 11 ) NOT NULL default '0',
auto_charge tinyint( 3 ) unsigned NOT NULL default '0',
last_notify int( 11 ) unsigned NOT NULL default '0',
UNIQUE KEY txnid( txnid, nid ) ,
KEY txnid( txnid )
) TYPE = MYISAM
MySQL said: #1061 - Duplicate key name 'txnid'
Comments
Comment #1
ezheidtmann commentedAlso affecting me on Mysql server version 4.0.24_Debian-5-log.
Comment #2
Jesse Grosjean commentedI see this too and am using MySQL 4.1.9-log. Does anyone know what needs to be changed to fix the problem?
Jesse
Comment #3
hunmonk commentedthe problem is right here:
UNIQUE KEY txnid (txnid,nid),
KEY txnid (txnid)
an individual table definition can't have two indexes with the same name, and both of the above indexes are named txnid--so one of those is going to need to be changed. i don't know much about drupal naming conventions yet, so i can't really advise how to change it officially. for me, i'm just running a test site on my local machine, and i've got nothing to lose--so this edit worked fine for me:
UNIQUE KEY txnid (txnid,nid),
KEY txnid2 (txnid)
if you're doing anything important, you might want to wait for an official fix, though... :)
chad
Comment #4
hunmonk commentedthe problem is right here:
UNIQUE KEY txnid (txnid,nid),
KEY txnid (txnid)
an individual table definition can't have two indexes with the same name, and both of the above indexes are named txnid--so one of those is going to need to be changed. i don't know much about drupal naming conventions yet, so i can't really advise how to change it officially. for me, i'm just running a test site on my local machine, and i've got nothing to lose--so this edit worked fine for me:
UNIQUE KEY txnid (txnid,nid),
KEY txnid2 (txnid)
if you're doing anything important, you might want to wait for an official fix, though... :)
chad
Comment #5
matt westgate commentedThis has been fixed. Thanks.
Comment #6
(not verified) commented