写sql的时候说外健约束的格式不正确

img


CREATE TABLE IF NOT EXISTS `s_attendance` (
  `id` int(5) NOT NULL AUTO_INCREMENT,
  `course_id` int(5) NOT NULL,
  `student_id` int(5) NOT NULL,
  `type` varchar(11) NOT NULL,
  `date` varchar(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `attendance_course_foreign_key` (`course_id`),
  KEY `attendace_student_foreign_key` (`student_id`),
  CONSTRAINT `attendace_student_foreign_key` FOREIGN KEY (`student_id`) REFERENCES `s_student` (`id`),
  CONSTRAINT `attendance_course_foreign_key` FOREIGN KEY (`course_id`) REFERENCES `s_course` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `s_attendance` (`id`, `course_id`, `student_id`, `type`, `date`) VALUES
    (13, 1, 2, '上午', '2018-09-04'),
    (14, 1, 4, '上午', '2018-09-04'),
    (15, 2, 2, '下午', '2021-07-15');

请帮忙看下怎么修改

s_student 和s_course id字段建个索引