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

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

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

	ALTER TABLE dbo.EST_NF_SAI ADD CONSTRAINT
		DF_EST_NF_SAI_UUID DEFAULT NEWID() FOR UUID;
END