if not exists(select 1 from syscolumns where id = object_id('EST_NF_ENT_DANFE_PROVISORIO_ITENS') and name = 'VLR_ICMS_OP')
begin
ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO_ITENS ADD
	VLR_ICMS_OP money NULL,
	PERC_DIFERIMENTO money NULL,
	VLR_ICMS_DIFERIMENTO money NULL

ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO_ITENS ADD CONSTRAINT
	DF_EST_NF_ENT_DANFE_PROVISORIO_ITENS_VLR_ICMS_OP DEFAULT 0 FOR VLR_ICMS_OP

ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO_ITENS ADD CONSTRAINT
	DF_EST_NF_ENT_DANFE_PROVISORIO_ITENS_PERC_DIFERIMENTO DEFAULT 0 FOR PERC_DIFERIMENTO

ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO_ITENS ADD CONSTRAINT
	DF_EST_NF_ENT_DANFE_PROVISORIO_ITENS_VLR_ICMS_DIFERIMENTO DEFAULT 0 FOR VLR_ICMS_DIFERIMENTO
end