How can we help you today? How can we help you today?
wpostma
To reproduce you will need SQL server 2016 CTP 3.3. Create this table, and commit it into SQL Source control: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Group]( [InternalGroupID] [BIGINT] IDENTITY(1,1) NOT NULL, [InternalRoleID] [BIGINT] NOT NULL, [GroupName] [NVARCHAR](64) NOT NULL, [ExtJson] [NVARCHAR](MAX) NULL, CONSTRAINT [PK_Group] PRIMARY KEY CLUSTERED ( [InternalGroupID] ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO After that commit, go to another working copy (another user's machine with SQL Source control) and try to fetch the changes and apply them. After that, run this tsql to add the constraint which contains an expression in the form ( isjson([ExtJSON])> 0): ALTER TABLE [dbo].[Group] WITH CHECK ADD CONSTRAINT [GROUP_ExtJSON_VALID] CHECK ( isjson([ExtJSON])> 0) GO ALTER TABLE [dbo].[Group] CHECK CONSTRAINT [GROUP_ExtJSON_VALID] GO Now commit that change on working copy on workstation 1. This commit should only contain the above extjson validation constraint and its check enable. Now go back to workstation 2 and try to update. Expectation: ALTER TABLE [dbo].[Group] WITH CHECK ADD CONSTRAINT [GROUP_ExtJSON_VALID] CHECK ( isjson([ExtJSON])> 0) GO Actual: ALTER TABLE [dbo].[Group] WITH CHECK ADD CONSTRAINT [GROUP_ExtJSON_VALID] CHECK ( [isjson]([ExtJSON])> 0) GO You can see an extra set of brackets. / comments
To reproduce you will need SQL server 2016 CTP 3.3. Create this table, and commit it into SQL Source control:SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Grou...
0 votes