Hello: I have a database that has (among others) a table that has 2 child tables. I made a change in one of the child tables. I created and ran an alter script from TDM. The script fails with the following messages: “Could not drop object ‘dbo.rubricResult’ because it is referenced by a FOREIGN KEY constraint …”. Then later on I get the message: “There is already an object named ‘PK_rubricScore’ in the database. … Could not create constraint. See previous errors …”. RubricScore is the child and RubricResult is the parent.
The alter script is trying to drop the parent before it drops the child. I have been doing the same exact type of change at least every few weeks for some years. Since the last time I did an update, I have not changed any settings. (I create the alter script by comparing my model to a reverse engineered live database). The sql server has not changed etc. I am now very confused and do not know how to proceed. Why have I never had this problem before? I have not recently upgraded TDM. I assume there must be some setting somewhere that forces children to be dropped before trying to drop parents? Any suggestions?
In my case we have many clients with identical databases and I run the same alter script against all client databases, so making this one change manually in SQL is not a real option. I am using TDM 22.214.171.124 and MS SQL 2005