add unique constraints to grading tasks and grades