1
Vote

Table constraints don't show in the 'Old objects' tab

description

When I select a table from the tree view from the schema tab, the constraints of that table appear in the 'New object' tab but don't appear in the 'Old object' tab. I expected the constraints to appear in both tabs.

This issue is visible even if we compare the same database o nthe left and on the right.

Example:
USE master
GO

IF  EXISTS (SELECT name FROM sys.databases WHERE name = N'TEST_DB_DIFF_1')
DROP DATABASE TEST_DB_DIFF_1
GO

CREATE DATABASE TEST_DB_DIFF_1
GO
USE TEST_DB_DIFF_1
GO
CREATE TABLE TEST1 (
    coll int,
    PRIMARY KEY (coll)
)
GO
CREATE TABLE TEST2 (
    col int references TEST1(coll)
)
GO

insert TEST1 values (1)
insert TEST1 values (2)
insert TEST1 values (3)
insert TEST1 values (4)
insert TEST2 values (2)
GO


USE master
GO

IF  EXISTS (SELECT name FROM sys.databases WHERE name = N'TEST_DB_DIFF_2')
DROP DATABASE TEST_DB_DIFF_2
GO

CREATE DATABASE TEST_DB_DIFF_2
GO
USE TEST_DB_DIFF_2
GO
CREATE TABLE TEST1 (
    coll int,
    PRIMARY KEY (coll)
)
GO
CREATE TABLE TEST2 (
    col int references TEST1(coll)
)
GO

insert TEST1 values (1)
insert TEST1 values (2)
insert TEST1 values (3)
insert TEST1 values (4)
insert TEST2 values (2)
GO

comments

jspraul wrote Apr 27, 2013 at 7:05 PM

Thanks for the repro!

Not sure why the other similar issue was closed -- I tried to re-open it but it timed out. If I can re-open it I will merge it with this one.