Toad World® Forums

Alter script via the Sync & Convert Wizard inflexible regarding constraint field order


#1

The alter script generated via the Sync & Convert Wizard suggests that Toad Data Modeler is inflexible with the ordering of the constraint’s fields.

If the model representation of a constraint perfectly matches that of the constraint on the database, the Sync & Convert Wizard will generate script that erroneously drops and re-adds the constraint with a different (and inexplicable) ordering of the fields involved in the constraint. For instance, if the modeled and actual constraint involve three fields ordered as follows

[field_three],[field_two],[field_five]

the following script is generated by the wizard

ALTER TABLE [dbo].[table] DROP CONSTRAINT [nk_table]

go

ALTER TABLE [dbo].[table] ADD CONSTRAINT [nk_table] UNIQUE ([field_two],[field_three],[field_five])

WITH (FILLFACTOR = 100)

ON [PRIMARY]

The only way to prevent this re-ordering of constraint fields from occurring is to order the modeled and actual constraint fields to match that being forced/assumed by the wizard (which changes the nature/function of the constraint).

Am I missing something?

Thanks!


#2

Hi,

we are not able to reproduce it in Toad Data Modeler version 5.2. (Tested with SQL Server models.) Please let us know what version of Toad Data Modeler you work with, what is the target database and ideally, please send us the two models to modeling@quest.com.

Thank you,

Vaclav