
--Migration_RCCP_20251117_152315.txt
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.OrderItems')
AND col_name(parent_object_id, parent_column_id) = 'ItemCode';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[OrderItems] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[OrderItems] ALTER COLUMN [ItemCode] [nvarchar](60) NULL
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.OrderItems')
AND col_name(parent_object_id, parent_column_id) = 'ItemName';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[OrderItems] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[OrderItems] ALTER COLUMN [ItemName] [nvarchar](60) NULL
