IF NOT EXISTS(SELECT * FROM SYS.columns C WHERE C.NAME = 'TP_FACE_FIN' AND OBJECT_ID = OBJECT_ID('EST_PROD_CPL_FACE_AGENDA'))
	BEGIN
		ALTER TABLE EST_PROD_CPL_FACE_AGENDA ADD TP_FACE_FIN INT 
		ALTER TABLE EST_PROD_CPL_FACE_AGENDA ADD CONSTRAINT DF_EST_PROD_CPL_FACE_AGENDA_TP_FACE_FIN DEFAULT 0 FOR TP_FACE_FIN
	END
	
GO

UPDATE EST_PROD_CPL_FACE_AGENDA SET TP_FACE_FIN = 0 
WHERE TP_FACE_FIN IS NULL;	