if not exists(select * from sys.indexes where name = 'CI_ConnectionState' AND object_id = object_id('dbo.ConnectionState'))
	create clustered index CI_ConnectionState on dbo.ConnectionState (RepositoryID, State);