if not exists(select 1 from syscolumns where id = object_id('EST_NF_ENT_DAR_IT') and name = 'VLR_BASE_ICMS_RETIDO')
begin 
	ALTER TABLE dbo.EST_NF_ENT_DAR_IT ADD
		VLR_BASE_ICMS_RETIDO money NULL,
		VLR_ICMS_RETIDO money NULL
		
	ALTER TABLE dbo.EST_NF_ENT_DAR_IT ADD CONSTRAINT
		DF_EST_NF_ENT_DAR_IT_VLR_BASE_ICMS_RETIDO DEFAULT 0 FOR VLR_BASE_ICMS_RETIDO

	ALTER TABLE dbo.EST_NF_ENT_DAR_IT ADD CONSTRAINT
		DF_EST_NF_ENT_DAR_IT_VLR_ICMS_RETIDO DEFAULT 0 FOR VLR_ICMS_RETIDO
end