Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MYSQL Table Structure
#1
Dear Admin,

When I try to install I get following error. What will be the wrong?

ERROR
SQL query:

-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentContent`
--
CREATE TABLE `tblDocumentContent` (

`document` INT( 11 ) NOT NULL DEFAULT '0',
`version` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`comment` TEXT,
`date` INT( 12 ) DEFAULT NULL ,
`createdBy` INT( 11 ) DEFAULT NULL ,
`dir` VARCHAR( 255 ) NOT NULL DEFAULT '',
`orgFileName` VARCHAR( 150 ) NOT NULL DEFAULT '',
`fileType` VARCHAR( 10 ) NOT NULL DEFAULT '',
`mimeType` VARCHAR( 70 ) NOT NULL DEFAULT '',
PRIMARY KEY ( `document` , `version` )
);

MySQL print:

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
Ok, I solve the problem... Just MyISAM problem Wink
Reply
#2
(03-03-2010, 10:03 PM)etastr Wrote: Dear Admin,

When I try to install I get following error. What will be the wrong?

ERROR
SQL query:

-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentContent`
--
CREATE TABLE `tblDocumentContent` (

`document` INT( 11 ) NOT NULL DEFAULT '0',
`version` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`comment` TEXT,
`date` INT( 12 ) DEFAULT NULL ,
`createdBy` INT( 11 ) DEFAULT NULL ,
`dir` VARCHAR( 255 ) NOT NULL DEFAULT '',
`orgFileName` VARCHAR( 150 ) NOT NULL DEFAULT '',
`fileType` VARCHAR( 10 ) NOT NULL DEFAULT '',
`mimeType` VARCHAR( 70 ) NOT NULL DEFAULT '',
PRIMARY KEY ( `document` , `version` )
);

MySQL print:

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
Ok, I solve the problem... Just MyISAM problem Wink

How did you solve the problem?
Reply
#3
(10-15-2012, 08:39 PM)alexapc Wrote: How did you solve the problem?

The file install/create_tables.sql misses the primary key statement for the table tblDocumentContent. install/create_tables-innodb.sql works fine and should be used anyway.

Uwe
Reply
#4
Dear all, i just solved the issue adding:

ENGINE = MyISAM

at the end of all "CREATE TABLE" command:

for example
-- --------------------------------------------------------
--
-- Table structure for table `tblDocumentContent`
--
CREATE TABLE `tblDocumentContent` (

`document` INT( 11 ) NOT NULL DEFAULT '0',
`version` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`comment` TEXT,
`date` INT( 12 ) DEFAULT NULL ,
`createdBy` INT( 11 ) DEFAULT NULL ,
`dir` VARCHAR( 255 ) NOT NULL DEFAULT '',
`orgFileName` VARCHAR( 150 ) NOT NULL DEFAULT '',
`fileType` VARCHAR( 10 ) NOT NULL DEFAULT '',
`mimeType` VARCHAR( 70 ) NOT NULL DEFAULT '',
PRIMARY KEY ( `document` , `version` )
) ENGINE = MyISAM ;

Rgds.
Ernesto
Reply


Forum Jump:


Users browsing this thread: