DacFx icon indicating copy to clipboard operation
DacFx copied to clipboard

Permanent Difference in Custom Table Type Computed Column

Open asrichesson opened this issue 1 year ago • 1 comments

  • SqlPackage or DacFx Version: 162.2.111.2
  • .NET Framework (Windows-only) or .NET Core: Both
  • Environment (local platform and source/target platforms): Microsoft SQL Server 2019 (RTM-CU12) (KB5004524) - 15.0.4153.1 (X64) Jul 19 2021 15:37:34 Copyright (C) 2019 Microsoft Corporation Express Edition (64-bit) on Windows 10 Enterprise 10.0 <X64> (Build 22631: ) (Hypervisor)

Steps to Reproduce:

  1. Create an empty sqlproj project. Can be old or new sqlproj type
  2. Add a custom table type with a computed column like so:
CREATE TYPE MyCustomTableType AS TABLE (
    NormalColumn            int,
    ComputedColumn  	AS NormalColumn
);
  1. Build and Publish the dacpac to a database
  2. Publish the database again to the same database
  3. Expected: No SQL commands are issued
  4. Actual: Table type is dropped and recreated
Dropping User-Defined Table Type [dbo].[MyCustomTableType]...
Creating User-Defined Table Type [dbo].[MyCustomTableType]...

Example project is attached here: MyTestDatabase.zip

Doing a schema comparison in Azure Data Studio doesn't reveal any difference. However, doing a schema comparison in visual studio between the project and the database reveals that the isPersistedNullable properties on the computed columns are different. image

Did this occur in prior versions? If not - which version(s) did it work in? This issue was happening back in version 16.1.6374.0 (DacFx/SqlPackage/SSMS/Azure Data Studio)

asrichesson avatar Mar 20 '24 21:03 asrichesson

Any plans on getting this resolved? Its been a few months already :(

murst avatar Aug 12 '24 12:08 murst