Trent,
In the DDT I have my relationships setup with "Enforce Relationship for INSERTs and UPDATEs" turned off as in the DDT1 screenshot. When I create a SQL database and do NOT deploy any data packages, then the relationship is correctly created in SQL as in screenshot DDT3 (i.e. "Enforce Foreign Key Constraint" is turned off). However, if I include a data package then the relationship is created incorrectly as in DDT2. So you get a different relationship whether you deploy data or not - regardless of whether the data is even deployed into the same table.
It all centres on whether you are deploying any data as part of your DDT package. If you are deploying data then "Enforce Foreign Key Constraint" is assumed to be on by the process which runs immediately after the data is deployed. Don't confuse this with the pre-data deployment stage when the database is physically created. During this stage the relationships are created correctly. It all goes wrong AFTER the data is deployed.
I can guess what is happening:-
1. If I had a table with relationships with "Enforce Relationship for INSERTs and UPDATEs" turned on AND I also wanted to copy data into the table during the deployment, the relationships would either have to be dropped or converted to the off state to allow the data to be deployed to the table - or else the constraint could reject some data.
2. After deploying the data, the relationship would then have to be recreated with "Enforce Relationship for INSERTs and UPDATEs" turned on.
The above two points are fine - provided that the relationship was defined as "Enforce Relationship for INSERTs and UPDATEs" turned on. In my case it is turned off but the DDT is making the assumption it is on when it recreates the relationships after the data has been deployed.
Please check the routine that creates the relationships AFTER the data has been deployed. I bet it assumes that all relationships have the "Enforce Relationship for INSERTs and UPDATEs" turned on and doesn't check the true setting.
Sorry for the long winded explanation but I know it is wrong and would love a fix
Regards,
Aaron