if not exists (select * FROM sys.syscolumns where name = 'OriginalRepositoryID' AND id = object_id(N'dbo.ConnectionLog'))
	alter table dbo.ConnectionLog add OriginalRepositoryID uniqueidentifier null;