if not exists (select * from sys.syscolumns where name = 'EventProcessed' and id = object_id(N'dbo.ConnectionHistory'))
    alter table dbo.ConnectionHistory add EventProcessed bit not null constraint DF_ConnectionHistory_EventProcessed default (0);