problem dropping constraints in version 11
todtrexler
Posts: 7
I have an issue where the scripts generated by SQL Compare 11 fail with errors such as the following:
[3725] The constraint 'PK_ExportParams' is being referenced by table 'DistrictExportParams', foreign key constraint 'FK_ExportParamDistrictExportParam'.
Could not drop constraint. See previous errors.
This happens when, for example, columns in the table ExportParams have been reordered.
In version 10, where my workflow was identical, I did not get this problem. Note that I do not ever select "Deploy All Dependancies" (have not done so in version 10, either) - this is due to the fact that this always deploys changes to my sequence objects, which causes issues.
As I said, my workflow and settings are identical between versions 10 and 11, but in 11 my scripts fail because the foreign key constraints on referencing tables are not dropped and re-added in the script.
Why has this changed? Is there somethign I can do to continue using version 11?
Thanks
[3725] The constraint 'PK_ExportParams' is being referenced by table 'DistrictExportParams', foreign key constraint 'FK_ExportParamDistrictExportParam'.
Could not drop constraint. See previous errors.
This happens when, for example, columns in the table ExportParams have been reordered.
In version 10, where my workflow was identical, I did not get this problem. Note that I do not ever select "Deploy All Dependancies" (have not done so in version 10, either) - this is due to the fact that this always deploys changes to my sequence objects, which causes issues.
As I said, my workflow and settings are identical between versions 10 and 11, but in 11 my scripts fail because the foreign key constraints on referencing tables are not dropped and re-added in the script.
Why has this changed? Is there somethign I can do to continue using version 11?
Thanks
Comments
Our apologies for the late reply through the forum.
I do see that you have a ticket open with one of our Support Engineers. Just to reiterate his message, this is a bug within v.11, and it is scheduled to be fixed in v.11.2.
Please let us know if you have any further questions in the meantime. Thank you for your time.
Best,
David
Redgate Software
Error: The constraint 'PK_t_Folio' is being referenced by table 'CryptFolio', foreign key constraint 'FK_CryptOwner_t_Folio'.
Could not drop constraint. See previous errors.
I have both of these set in my code:
options.SetOptions(Options.IgnoreConstraintNames, true);
options.SetOptions(Options.IgnoreSystemNamedConstraintNames,true);
And I am still getting the constraint error. Any thoughts?
I'm guessing you want something like this:
Apologies if this wasn't clear.