I've taken a lot of interest in this thread since I'm very interested in DDT and Randy Jean is a long-time (and highly accomplished) VFE user who I know to be saner than he sounds
I can reproduce the errors that Randy is talking about consistently. They aren't the result of a 'bug' in DDT so much as the result of what I think might be a bug in SQL Server that could easily be worked around in DDT by using the same naming convention for constraints on default values that SQL uses and that DDT itself uses when creating the constraint at the same time as the field ( i.e. DF_<tablename> prepended to the field name )
First, this error can be reproduced entirely outside DDT. Create database junk. Create tables
table1 and table2. pkfield (autoint) , cname (char(10), ncount (int) for both tables.
script constraints for table1 where ('') and (0) are applied to the non pk fields naming the constraint the same as the fieldname - no prepending
use same script only changing tablename to create constraints for the second table and you will get the error that an object named cname already exists in the database.
Probably shouldn't happen, but without the prepending it does.
When a constraint is added in DDT to a field that does not previously have a constraint DDT names the constraint exactly the same as the field name. If two constraints are added to two different tables in the package on fields of the same name, the error will occur.
I've reproduced this numerous times with numerous scenarios. I get slightly different result from Randy in that when I follow his test steps of creating two tables with identical fields, no constraints, import them to DDT, add constraints, deploy I don't get the error. But if I add two identical fields to the two tables in DDT, deploy, then add constraints and deploy I get the error every time when the second table tries to create the constraint.
I'm sure just changing the naming convention DDT uses in these scenarios to the standard SQL convention would fix it and if that's not a real big deal I'd say it would be greatly appreciated.
Meanwhile, is there a spot in the strataframe database (or in the package) where the constraint name that is going to be created can be tweaked prior to deployment?
I can see where this might be a showstopper for deploying these kinds of changes.
I'd be happy to reproduce all this in a 3 minute demo via logmein if anybody at Microfour would like to see it.