Group: StrataFrame Users
Posts: 277,
Visits: 1.1K
|
I have found out where it is going wrong and have sent the details to support. However, just in case anyone else is having the same problem I will post the details here too.
For some reason, if you deploy data packages the relations are created correctly before the data is deployed, then dropped and recreated incorrectly after the data is deployed. To explain further, I created a post deployment script as a temporary fix to set all the relations to “Enforce FK Constraint” to No and I was surprised to see it didn’t work. I then ran a SQL profile and found the following:-
1. During the database sync phase, the relations were actually created correctly as “Enforce FK Constraint” = no. At this point the relationships are correctly defined as per the database model.
2. The post-deployment script ran and (needlessly) also set the relations to “Enforce FK Constraint” = no.
3. The data deployment process ran and after this stage the SQL profiler showed that every relationship was dropped and recreated incorrectly as “Enforce FK Constraint” = yes.
I have found that if I remove all of my deployment data packages then the relationships are created correctly. If I add a simple data package then the relationships are created correctly before the data is deployed, then they are dropped and recreated incorrectly after the data has been deployed. There is nothing complicated about the data package. It is a simple table containing a single record to show the database version and it has no relationships to any other table.
There appears to be a secondary process that drops and recreates the relationships incorrectly which is only triggered when a data package is deployed and this is undoing what has been correctly done up to that point.
Aaron
|