anchor.diff:  GO
   
   CREATE PROCEDURE <%= data_module.sql.schema %>.spCheckConstraints
  -(
  -  @PrintConstraintsOnError BIT = 0
  -)
   AS
   BEGIN
     SET NOCOUNT ON;
  
positive.code:   ;<%= validation.common_table_expression %> SELECT @Ignored = 1 WHERE EXISTS (<%= validation.invariant_negative_sql %>)
    IF (@@ERROR != 0 OR @@ROWCOUNT != 0)
    BEGIN
      INSERT INTO @FailedConstraintChecks(SchemaName, TableName, ConstraintName)
        VALUES ('<%= data_module.sql.schema %>','<%= object_type.sql.table_name %>','V_<%= validation.name %>')
    END
  <%
     end
  
negative.code:   (
      SchemaName VARCHAR(500),
      TableName VARCHAR(500),
      ConstraintName VARCHAR(500),
      ViewSQL VARCHAR(MAX) NULL
    );
  <% data_module.object_types.select{|object_type| !object_type.abstract?}.each do |object_type| %>
  <%
  