bug fix: delete lesson, fixed database constraints