How can we help you today? How can we help you today?

Ignoring Diffs in Enabled vs. Disabled? Foreign Keys

I'm running SQL Compare 10.4.8.87

I'm comparing two databases: The first is defined like this:
create database [Disabled]
go

use [Disabled]
go

create table A 
(
   id int identity primary key
)

create table POINTER1
(
   id int identity,
   a_id int,
   constraint pk_POINTER1 primary key (id)
)
go
		
ALTER TABLE POINTER1 
	WITH NOCHECK ADD CONSTRAINT FK_A_POINTER FOREIGN KEY (a_id) REFERENCES A (id)
go

ALTER TABLE POINTER1 NOCHECK CONSTRAINT FK_A_POINTER;
go

The second is defined like this:
create database [Enabled-NotTrusted]
go

use [Enabled-NotTrusted]
go

create table A 
(
   id int identity primary key
)

create table POINTER1
(
   id int identity,
   a_id int,
   constraint pk_POINTER1 primary key (id)
)
go

insert A default values;
insert POINTER1 (a_id) values (2);
go
		
ALTER TABLE POINTER1 
	WITH NOCHECK ADD CONSTRAINT FK_A_POINTER FOREIGN KEY (a_id) REFERENCES A (id)
go

When ignore nocheck is disabled (triple negative! meaning scrutinize nocheck), these compare as different (good!)
When ignore nocheck is enabled, these compare as the same, but that's not what I expected. The docs say disabled FKs are not ignored with this option and yet it seems to be ignored.

In my project, I really would like to ignore FK trustedness, but I really want to care about FK disabledness.
mjswart
0

Comments

4 comments

  • Evan Moss
    Hello,

    Just a note to anyone looking into this post -- we have a support ticket open currently and I'll post more here when I finish my investigation.

    Thanks,
    Evan
    Evan Moss
    0
  • mjswart
    From what I understand in the support ticket, this is a known bug:
    (reference SC-4077)
    mjswart
    0
  • shawnC
    Bugs don't get fixed and you can't see the list of bugs either
    shawnC
    0
  • Evan Moss
    Hello,

    After updating our system, it does appear this is being discussed for a fix (SC-4077). I don't have a timeline, but it's definitely on the radar.

    You're welcome to contact us periodically for updates on the bug. You can also check release notes for the list of bugs fixed each version: http://documentation.red-gate.com/displ ... ease+notes

    Thanks,
    Evan
    Evan Moss
    0

Add comment

Please sign in to leave a comment.