if not exists (select * from sys.syscolumns where name = 'CredentialConnectionID' and id = object_id(N'dbo.ConnectionLog'))
    alter table dbo.ConnectionLog add CredentialConnectionID uniqueidentifier null