if not exists (select * FROM sys.syscolumns where name = 'OpenMode' AND id = object_id(N'dbo.ConnectionLog')) 
  alter table dbo.ConnectionLog ADD OpenMode int null;
  
if not exists (select * FROM sys.syscolumns where name = 'CloseMode' AND id = object_id(N'dbo.ConnectionLog')) 
  alter table dbo.ConnectionLog ADD CloseMode int null;
    
if not exists (select * FROM sys.syscolumns where name = 'HostName' AND id = object_id(N'dbo.ConnectionLog')) 
  alter table dbo.ConnectionLog ADD HostName varchar(100) null;