CHECK CONSTRAINT

Description

Some parts in the output code are omitted for clarity reasons.

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

IN -> SqlServer_01.sql
ALTER TABLE
    [Person].[EmailAddress] CHECK CONSTRAINT [FK_EmailAddress_Person_BusinessEntityID]
GO

Snowflake

OUT -> SqlServer_01.sql
--ALTER TABLE IF EXISTS Person.EmailAddress
----                                          --** SSC-FDM-0014 - CHECK STATEMENT NOT SUPPORTED **
--                                          CHECK CONSTRAINT [FK_EmailAddress_Person_BusinessEntityID]

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