if not exists (SELECT * FROM sys.indexes WHERE name = 'IX_GroupInfoHistory_GroupInfoID' AND object_id = OBJECT_ID('dbo.GroupInfoHistory'))
    create index IX_GroupInfoHistory_GroupInfoID on dbo.GroupInfoHistory (GroupInfoID)