UPDATE ConsumingObjects Set RightHolderID = null 
where RightHolderID not in (select LegalEntityID from LegalEntities)
GO
ALTER TABLE ConsumingObjects
	ADD FOREIGN KEY (RightHolderID)
	REFERENCES LegalEntities(LegalEntityID)
