Skip to content

SDK Style project's DacPac with .refactor file with table rename - resulting in dependent view drop and recreate #581

Open
@meni-braun

Description

@meni-braun
  • SqlPackage or DacFx Version: <Sdk Name="Microsoft.Build.Sql" Version="1.0.0-rc3" />
  • .NET Framework (Windows-only) or .NET Core: .NET Core 8
  • Environment (local platform and source/target platforms): Local .NET Core 8 using dotnet build

Steps to Reproduce:

  1. Comparing a DacPac file of original SSDT style sqlproj, that was created with a .refactorlog file with an entry of renaming a table which has a view, to a new SDK style project's DacPac file - resulting in a DROP and RECREATE of that view dependent on the renamed table, although the refactor entries were applied years ago.
  2. Removing that .refactorlog file from the new SDK style project's DacPac file - resulting empty changes schema comparison between the original and new DacPac.

Comparing the DacPac files I see both original and new contain .refactor file and more or less the same size of model. The only changes there are ordering of element definitions.

Creation of an update script shows the view drop, followed by refactor's table rename commands, the view recreation. For some reason the new project created a DacPac that executes old refactor commands.

Did this occur in prior versions? If not - which version(s) did it work in? There is an unexpected change in the resulting DacPac.

(build sdk)

Please advise!
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: build sdkRelated to Microsoft.Build.Sql SDKbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions