Constraint names of domains

Hi,

I use a lot of domains and the names of check constraint should be like CK_TableShortName_ColumnName.
I defined already a property ‘TableShortName’ for every entity.

Now I’m looking for the easiest way to get the those names for check constraints?

Adapt the generation of the check constaints? (Doesn’t seem so easy)

Is it possible to define a new application variable ‘TableShortName’? The I could name all domain constraints as CK_<%TableShortName%>_<%ColumnName%>

Other solution?

Hi,

probably easier solution would be in writing a script that will, on manual execution, change names of check constraints at once. Instead of using new variable it might work this way:

Click menu item to run macro Rename Check Constraints.
Iterate all existing checkconstraints and reset the name to desired form.

Regards,

Vaclav