
IF EXISTS
(
    SELECT * FROM INFORMATION_SCHEMA.COLUMNS 
		WHERE TABLE_NAME = 'RC_CLI' AND COLUMN_NAME = 'UUID'
		AND DATA_TYPE = 'varchar'
)
BEGIN

	ALTER TABLE dbo.RC_CLI DROP CONSTRAINT DF_RC_CLI_UUID ;	
	ALTER TABLE dbo.RC_CLI ALTER COLUMN UUID uniqueidentifier  NULL;
	ALTER TABLE dbo.RC_CLI ADD CONSTRAINT
		DF_RC_CLI_UUID DEFAULT NEWID() FOR UUID;
END
go

IF NOT EXISTS
(
    SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'RC_CLI' AND COLUMN_NAME = 'UUID'
)
BEGIN
	ALTER TABLE dbo.RC_CLI ADD
		UUID uniqueidentifier  NULL;

	ALTER TABLE dbo.RC_CLI ADD CONSTRAINT
		DF_RC_CLI_UUID DEFAULT NEWID() FOR UUID;
END