
IF NOT EXISTS(SELECT 1 FROM syscolumns WHERE ID = OBJECT_ID('EST_NF_ENT_PED_CP') AND NAME = 'DT_CAD')
BEGIN  
	ALTER TABLE dbo.EST_NF_ENT_PED_CP ADD
		DT_CAD datetime NULL

	ALTER TABLE dbo.EST_NF_ENT_PED_CP ADD CONSTRAINT
		DF_EST_NF_ENT_PED_CP_DT_CAD DEFAULT GETDATE() FOR DT_CAD
END
