IF NOT EXISTS(SELECT 1 FROM sys.COLUMNS WHERE NAME='CD_AGREGADOR' and  object_id=object_id('EST_NF_ENT_DANFE_PROVISORIO_ITENS'))
    BEGIN
ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO_ITENS ADD
	CD_AGREGADOR varchar(100) NULL

ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO_ITENS ADD CONSTRAINT
	DF_EST_NF_ENT_DANFE_PROVISORIO_ITENS_CD_AGREGADOR DEFAULT '' FOR CD_AGREGADOR
END