Skip to content

Including child dependencies without parent works if added from "empty" changeset #19175

@Benjin

Description

@Benjin

Repro:
0. Create two new databases, e.g. DatabaseOne and DatabaseTwo

  1. In DatabaseOne, create two tables with a PK/FK relationship:
CREATE TABLE ParentTable (
    ParentID INT PRIMARY KEY,
    ParentName NVARCHAR(50) NOT NULL
);

CREATE TABLE ChildTable (
    ChildID INT PRIMARY KEY,
    ChildName NVARCHAR(50) NOT NULL,
    ParentID INT NOT NULL,
    FOREIGN KEY (ParentID) REFERENCES ParentTable(ParentID)
);
  1. Compare from DatabaseOne (with tables) -> DatabaseTwo (empty db)
  2. Try to exclude ParentTable -> see error that a dependent exists (correct)
  3. Exclude everything using "Exclude all changes" checkbox -> succeeds (correct)
  4. Re-add only ChildTable

Expected:

  • Error because ParentTable needs to be there first

Reality:

  • No error, UI shows ParentTable excluded
  • Clicking "generate script" produces a script that creates both ChildTable and ParentTable
  • Applying changes also creates both tables, despite ParentTable being excluded

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions