Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Duplicate Column Name Error

forums forums SQLyog Using SQLyog Duplicate Column Name Error

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #9012
      PatMc
      Member

      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

      ???

    • #17956
      PatMc
      Member

      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.

    • #17957
      Shadow
      Member

      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!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.