Auto-Increment property not importing

The auto index property of the primary keys didn't get imported. I have to go back and edit each primary key attribute and click the autoindex checkbox after importing from my database.

Login or register to post comments

Comments

thanks for your bug

thanks for your bug report.
Would you mind further explaining the bug?
Where is the autoindex checkbox?
Implicit indexes are not imported as they are automatically generated by the database.

The original SQL script

The original SQL script reverse engineered by SchemaBase (the one I exported from MySql) looked like this:


CREATE TABLE IF NOT EXISTS `Account` (
`Account_ID` bigint(20) NOT NULL auto_increment,
`Account_Name` varchar(64) NOT NULL,
`Account Type` varchar(64) NOT NULL,
PRIMARY KEY (`Account_ID`),
KEY `Account_Name` (`Account_Name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

But the exported SQL script from SchemaBase looks like this (note, no autoincrement)...

CREATE TABLE `seenster_sb`.`Account` (
`Account_ID` BIGINT(20) NOT NULL,
`Account_Name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Account Type` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`Account_ID`)
) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=MYISAM
AUTO_INCREMENT=2
AVG_ROW_LENGTH=28
CHECKSUM=0
DELAY_KEY_WRITE=0
PACK_KEYS=DEFAULT
ROW_FORMAT=DYNAMIC;

Under Entity->Attrubute->Edit there is a checkbox for "Auto Index". I had to turn these on manually.

I have not yet tried Forward Engineering with these check boxes checked so I don't know if they result in the autoincrement properties being included in the SQL script.

got your point!

we'll look into that. and I've changed your post title to 'Auto Increment'; easier for our developers to track the issue.

Thanks for the

Thanks for the clarification.
The bug is fixed.
Please run the reverse engineer again or tick the auto increment checkbox.