DacFx
DacFx copied to clipboard
Permanent Difference in Custom Table Type Computed Column
- 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:
- Create an empty sqlproj project. Can be old or new sqlproj type
- Add a custom table type with a computed column like so:
CREATE TYPE MyCustomTableType AS TABLE (
NormalColumn int,
ComputedColumn AS NormalColumn
);
- Build and Publish the dacpac to a database
- Publish the database again to the same database
- Expected: No SQL commands are issued
- 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.
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)
Any plans on getting this resolved? Its been a few months already :(