CHECK CONSTRAINT

Description

When the constraint that was being added in the SQL Server code is not supported at all in Snowflake, Snowconvert comments out the entire ALTER statement, since it's no longer valid.

Sample Source Patterns

SQL Server

ALTER TABLE
    [Person].[EmailAddress] CHECK CONSTRAINT [FK_EmailAddress_Person_BusinessEntityID]
GO

Snowflake

-- ** MSC-ERROR - MSCEWI4061 - ALTER COLUMN COMMENTED OUT BECAUSE CHECK constraint IS NOT SUPPORTED IN SNOWFLAKE **
--ALTER TABLE
--    [Person].[EmailAddress] CHECK CONSTRAINT [FK_EmailAddress_Person_BusinessEntityID]
-- ** MSC-WARNING - MSCEWI1040 - THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE **
--GO

Known Issues

1. ALTER TABLE ... CHECK CONSTRAINT with an invalid constraint is commented out

Whenever the ALTER TABLE ... CHECK CONSTRAINT statement does not contain a valid constraint for Snowflake, the entire ALTER TABLE statement is commented out, since it's not longer valid.

Last updated