
IF NOT EXISTS (SELECT * FROM SYS.columns C WHERE C.name = 'FLAG_EXIGE_PMC_ST_CARGA_TRIB' AND OBJECT_ID = OBJECT_ID('EST_TRIB_ALIQ_MVA_PARAM'))
	BEGIN
		ALTER TABLE EST_TRIB_ALIQ_MVA_PARAM ADD FLAG_EXIGE_PMC_ST_CARGA_TRIB INT
		ALTER TABLE EST_TRIB_ALIQ_MVA_PARAM ADD CONSTRAINT DF_EST_TRIB_ALIQ_MVA_PARAM_FLAG_EXIGE_PMC_ST_CARGA_TRIB DEFAULT 0 FOR FLAG_EXIGE_PMC_ST_CARGA_TRIB
	END

GO

	
UPDATE EST_TRIB_ALIQ_MVA_PARAM SET 	
	FLAG_EXIGE_PMC_ST_CARGA_TRIB = 0
WHERE 
	FLAG_EXIGE_PMC_ST_CARGA_TRIB IS NULL