Problem With Unique Set On Column Properties

Hi,

I am generating to SQL Server 2008 and I have a column on a table that I have checked the unique property for. This then is generated absolutely fine with the following sql:-

ALTER TABLE [workflow_instance] ADD CONSTRAINT [workflow_instance_uuid] UNIQUE ([workflow_instance_uuid])

go

However, when I come to generate a change script (from model to database), this shows up as a difference in the Sync and Convert Wizard - it says that the model column unique property is set to True and the reverse engineering column unique property is set to False (presumably because there is no actual unique property in sql server columns). It also shows the key itself as a difference by saying that the key workflow_instance_uuid does not exist in the reverse engineered model - which is also true as all that has been done is add a unique constraint on the column.

So it looks as though there is a discrepancy between what is generated and what is reverse engineered for unique columns in sql server 2008.

Is there something I can change, maybe in the model or in the reverse engineering settings, that will fix this false positive so that it understands they are one and the same thing?

Thanks

Dan

Just to add, on completing the alter script generation I get the following sql:-

ALTER TABLE [dbo].[workflow_instance] DROP CONSTRAINT [workflow_instance_uuid]

go

ALTER TABLE [dbo].[workflow_instance] ADD CONSTRAINT [workflow_instance_uuid] UNIQUE ([workflow_instance_uuid])

go

So there is definitely something wrong here!

Hi Dan,

The issue you are reporting is, I think, the same one as dealt by Vaclav here www.toadworld.com/…/22083.aspx.

Regards,

Lukas

Hi Lukas,

Yes it definitely looks the same! I did do a search before posting but somehow didn’t find this one.

I will give it a try and let you know – good to see it is already on the cards to be fixed also in a future release J

Cheers
Dan

From: Lukas [mailto:bounce-Lukas@toadworld.com]
Sent: 10 July 2014 11:40
To: tdm@toadworld.com
Subject: RE: [Toad Data Modeler - Discussion Forum] Problem With Unique Set On Column Properties

RE: Problem With Unique Set On Column Properties

Reply by Lukas

Hi Dan,

The issue you are reporting is, I think, the same one as dealt by Vaclav here www.toadworld.com/…/22083.aspx.

Regards,

Lukas

To reply, please reply-all to this email.

Stop receiving emails on this subject.
Or Unsubscribe from Toad Data Modeler - General notifications altogether.
Toad Data Modeler - Discussion Forum

Flag this post as spam/abuse.

Yep that worked great, thanks!