Database constraint error on enabling CiviCase
Resolved. I found the code that was inserting the sample data. It was first pulling from option_group where name=case_type. For some reason my database did not have this row - so the subsequent line inserting into option_value with the retrieved id of the option_group row failed.

I manually inserted a row into option_group with name of case_type. (I used "Case Type" for both title and description and set the is_active column and is_reserved column to 1 and is_locked to 0.

This got rid of the error.