Added unique constraints to statistics and resources