﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Programming / TFS/Data Dude/DBPro  / Deploy does not detect check constraint changes / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 03:39:35 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Deploy does not detect check constraint changes</title><link>http://www.sqlservercentral.com/Forums/Topic1314261-2998-1.aspx</link><description>Ok, so I forgot that OR and AND have different operator precedence, so the two constraints are effectively the same.Since I usually always put parentheses for readability - this slipped my mind :hehe:</description><pubDate>Tue, 12 Jun 2012 06:30:50 GMT</pubDate><dc:creator>Øystein Fallo</dc:creator></item><item><title>Deploy does not detect check constraint changes</title><link>http://www.sqlservercentral.com/Forums/Topic1314261-2998-1.aspx</link><description>I am using SQL Server database project in VS 2010, and am experiencing a weird behavior related to check constraints.I have a table, with 3 columns. For simplicity lets call them column_1, column_2 and column_3.Then I have a check constraint like this:[code="sql"]ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [CheckConstraint1] CHECK (column_1 is not null and column_2 is not null or column_1 is not null and column_3 is not null)[/code]Deploy to database, and everything looks good.Then I change the constraint by adding some parentheses to this:[code="sql"]ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [CheckConstraint1] CHECK ((column_1 is not null and column_2 is not null) or (column_1 is not null and column_3 is not null))[/code]This is obviously quite a different check constraint, but deploy does not seem to catch this change.Anyone got any suggestions?</description><pubDate>Tue, 12 Jun 2012 02:13:45 GMT</pubDate><dc:creator>Øystein Fallo</dc:creator></item></channel></rss>