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

	ALTER TABLE dbo.EST_NF_ENT_DANFE_PROVISORIO_CHECKIN_ENTRADA ADD CONSTRAINT
		DF_EST_NF_ENT_DANFE_PROVISORIO_CHECKIN_ENTRADA_DT_TRANSACAO DEFAULT GETDATE() FOR DT_TRANSACAO
end