Foreign keys not compared?

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited May 22, 2003 4:33AM in SQL Compare Previous Versions
Hi Partick,

Is there an option in SQL Compare 1.61 to ignore names of constraints?
Version 2.01 + has this option, and I think it may be the one you're looking
for.

Regards,
Brian Donahue
Technical Support

"Patrick McClanahan" <psydid@hotmail.com> wrote in message
news:4Ib5lJxHDHA.2864@server53...
> I have two SQL2000 databases. On each I run:
>
> CREATE TABLE dbo.table1 ([pk] [uniqueidentifier] NOT NULL)
> GO
>
>
> ALTER TABLE table1 ADD CONSTRAINT pk_table1 UNIQUE (pk)
> GO
>
> CREATE TABLE [dbo].[table2] (
> [table1_fk] [uniqueidentifier] NOT NULL,
> [data] [nvarchar] (200) NOT NULL
> ) ON [PRIMARY]
> GO
>
> ALTER TABLE table2 WITH CHECK ADD CONSTRAINT FK_table2_table1
> FOREIGN KEY (table1_fk) REFERENCES table1(pk) ON DELETE CASCADE
> GO
>
> ...but on the second database I give the foreign key a different name.
>
> SQLCompare (v1.6.1) doesn't pick up on the difference. It doesn't even
pick
> up on the difference if the foreign key constraint is missing entirely
from
> one DB or the other. I've checked all the options, and I can't find any
> relevant one that's set in such a way as to cause this.
>
> Anyone got an idea?
>
>
This discussion has been closed.