fixed bugs of postgresql auto-imcrement and refactoring loadLesson
fixed bugs of postgresql auto-imcrement and refactoring loadLesson