Toad World® Forums

autoincrement in primary key


#1

Hello again,
my table sazba containts primary key ‘id_sazby’ and 2 attributes ‘sazba’ and ‘hidden’. I want primary key to be AUTOINCREMENT. Script from TDM is here:
CREATE TABLE sazba
( id_sazby Bigint NOT NULL AUTO_INCREMENT,
sazba Int NOT NULL,
hidden Bool);
ALTER TABLE sazba ADD PRIMARY KEY (id_sazby);

Now, I try to run it in PhpMyAdmin
– Table sazba
CREATE TABLE sazba (
id_sazby Bigint NOT NULL AUTO_INCREMENT ,
sazba Int NOT NULL ,
hidden Bool);

MySQL reports:
#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

MySQL needs something like that:
CREATE TABLE sazba2 (
id_sazby Bigint NOT NULL AUTO_INCREMENT PRIMARY KEY ,
sazba Int NOT NULL ,
hidden Bool
);

Thank you,
Martin

MySQL: 5.0.45-community-nt


#2

Hello Martin,

Thanks for your post.

What version of TDM3 do you use?

In commercial v. 3.0.13.175, this problem is fixed.
For current Beta 3.1.1.166, please use the following hotfix:
http://modeling.inside.quest.com/entry.jspa?externalID=1254&categoryID=34

In next Beta 3.1.2.52, it 's been fixed too. The new Beta should be released this week.

If you come across any trouble, please write us back. Thanks.

Regards,

Vladka + TDM Team


#3

Thank you,
I’m using beta 3.1.1.166. I’m sorry for not telling the version number.

Martin


#4

Hi Martin,

Just a quick note to let you know that Beta 3.1.2.52 fixing this problem has been released. Please feel free to update it.
(Before you install the new Beta version, please uninstall the previous one. Thanks.)

Beta download:
http://modeling.inside.quest.com/ann.jspa?annID=150

Regards,

Vladka