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

ALTER TABLE dbo.EST_NF_ENT_CHECKIN_ENTRADA_TEMP ADD CONSTRAINT
	DF_EST_NF_ENT_CHECKIN_ENTRADA_TEMP_DT_CAD DEFAULT GETDATE() FOR DT_CAD

ALTER TABLE dbo.EST_NF_ENT_CHECKIN_ENTRADA_TEMP SET (LOCK_ESCALATION = TABLE)
end