Added database cleanup before updating lessons