if not exists(select * from sys.indexes where name = 'IX_ConnectionState_ConnectionID' AND object_id = object_id('dbo.ConnectionState'))
	create nonclustered index IX_ConnectionState_ConnectionID on dbo.ConnectionState (ConnectionID);