IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_REPOSICAO_PBM' AND OBJECT_ID = OBJECT_ID('EST_NF_ENT_DANFE_PROVISORIO'))
begin
ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO ADD
	FLAG_REPOSICAO_PBM int NULL

ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO ADD CONSTRAINT
	DF_EST_NF_ENT_DANFE_PROVISORIO_FLAG_REPOSICAO_PBM DEFAULT (0) FOR FLAG_REPOSICAO_PBM
end