if exists (select * from sys.indexes where name = 'UIX_T_EHR_RUS_REF_BOOKS_Entities_CurrVersion')
	drop index UIX_T_EHR_RUS_REF_BOOKS_Entities_CurrVersion ON EHR.T_EHR_RUS_REF_BOOKS;
go
CREATE UNIQUE INDEX UIX_T_EHR_RUS_REF_BOOKS_Entities_CurrVersion ON EHR.T_EHR_RUS_REF_BOOKS
(
	[Entities] ASC,
	[CurrVersion] ASC,
	[Deleted] ASC
)
where [Deleted] = 0

