forums › forums › SQLyog › Using SQLyog › Duplicate Column Name Error
- This topic is empty.
-
AuthorPosts
-
-
May 25, 2005 at 10:39 pm #9012PatMcMember
I'm getting a duplicate column name error when I try to copy a database down from a remote server to my local.
I checked the column name listed in the error message and it is not duplicated.
This same database copied with no problem using version 3.x
???
-
May 26, 2005 at 1:12 am #17956PatMcMember
I may have found it.
Here is what the create table object looks like for the problem table
CREATE TABLE `tbl_companyinfo` (
`comp_ID` int(11) NOT NULL auto_increment,
`comp_Name` varchar(50) default NULL,
`comp_Address1` varchar(255) default NULL,
`comp_Address2` varchar(50) default NULL,
`comp_City` varchar(50) default NULL,
`comp_State` varchar(20) default NULL,
`comp_Zip` varchar(20) default NULL,
`comp_Country` varchar(50) default NULL,
`comp_Phone` varchar(30) default NULL,
`comp_Fax` varchar(30) default NULL,
`comp_Email` varchar(50) default NULL,
`comp_ChargeBase` tinyint(1) default NULL,
`comp_ChargeWeight` tinyint(1) default NULL,
`comp_ChargeExtension` tinyint(1) default NULL,
`comp_ShowUpSell` tinyint(1) default NULL,
`comp_EnableShipping` tinyint(1) default NULL,
PRIMARY KEY (`comp_ID`,`comp_ID`),
KEY `CompanyID` (`comp_ID`)
) TYPE=MyISAM
When I delete the comp_ID field and re-create it the PRIMARY KEY (`comp_ID`,`comp_ID`), changes to PRIMARY KEY (`comp_ID`), and the database copies down without error.
I hope the application still runs properly.
-
May 26, 2005 at 7:05 am #17957ShadowMember
In the old days I commited the mistake of creating an additional index on my pk fields and that adversly affected data sync… You only need to drop the extra, unneeded index in this case!
-
-
AuthorPosts
- You must be logged in to reply to this topic.