The DB fields lesson_builder_item.altgradebook and lesson_builder_item.gradebookid have limits of 35 characters.
This caused us a lot of problems in production as Lessons is highly utilized. Therefor, the ID generated for this table becomes very high (currently ours is hovering around 15 million in production).
Once the ID becomes large enough, the DB will throw a constraint violation.
For instance, this is the string that is added to the altgradebook field:
where 1140629 is the ID of the record in the lesson_builder_item table. As you can see, with an ID in the million range, the actual length of this field is 35 characters. Once that ID moves on to 10 million and greater, it will violate the constraint, and you will be unable to create student content pages with graded comments.
The solution is to give yourself some more room in these fields. We changed it to VARCHAR(100 char) just to be on the safe side. (Change in .hbm.xml file too).