if not exists(select * from sys.indexes where name = 'PK_ConnectionState' AND object_id = object_id('dbo.ConnectionState'))
	alter table dbo.ConnectionState add constraint PK_ConnectionState primary key (ID);