if not exists (select * from sys.indexes where name = 'IX_ConnectionLog_UserInfoID' and object_id = object_id(N'dbo.ConnectionLog'))
    create nonclustered index IX_ConnectionLog_UserInfoID on dbo.ConnectionLog (UserInfoID)