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