Toad World® Forums

BUG?! Toad generated DDL does not reproduce a disabled FK status

If a given table contains a disabled foreign key, Toad generates a DDL script , but with the FK enabled.

Given the table:

CREATE TABLE tA(
id INT, ParentId INT, CONSTRAINT PK_tA PRIMARY KEY CLUSTERED(id));

ALTER TABLE tA WITH NOCHECK ADD CONSTRAINT FK_Parent FOREIGN KEY (ParentId) REFERENCES tA(id) NOT FOR REPLICATION;

ALTER TABLE tA NOCHECK CONSTRAINT FK_Parent;

Here's the code generated by Toad for SQL Server 6.5 Trial:

Here's the code generated by SSMS. Pay attention to the last row!

Hi,

I’ve created TSS-1015 for this issue, I also think it’s a bug.We will fix it in the future toad beta.

Thanks again.

Cathy.