if not exists (select * from sys.indexes where name = 'IX_ConnectionHistory_HistoryType_Version_with_includes' AND object_id = object_id('dbo.ConnectionHistory'))
	create nonclustered index IX_ConnectionHistory_HistoryType_Version_with_includes on dbo.ConnectionHistory (HistoryType, Version) include (ConnectionID, SecurityGroup, ConnectionType, GroupName)