2021-03-26 17:08:06 +08:00
|
|
|
alter table exam_definition modify lesson_id bigint null comment '所属课程ID',
|
|
|
|
add map_id bigint not null comment '地图id' after id;
|
|
|
|
|
|
|
|
-- 更新exam_definition的map_id字段
|
2021-03-30 13:05:25 +08:00
|
|
|
UPDATE exam_definition SET map_id =( SELECT map_id FROM ls_lesson WHERE exam_definition.lesson_id = ls_lesson.id);
|
2021-03-29 15:04:13 +08:00
|
|
|
-- 更新exam_definition的type字段
|
2021-03-30 13:05:25 +08:00
|
|
|
UPDATE exam_definition SET type =( SELECT prd_type FROM ls_lesson WHERE exam_definition.lesson_id = ls_lesson.id);
|
2021-03-26 17:08:06 +08:00
|
|
|
|
|
|
|
alter table org_exam
|
|
|
|
modify org_id bigint not null,
|
|
|
|
add creator_id bigint not null,
|
|
|
|
add create_time datetime not null;
|
|
|
|
|
|
|
|
ALTER TABLE `org_exam`
|
|
|
|
ADD COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT FIRST ,
|
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
2021-03-29 15:04:13 +08:00
|
|
|
-- org_lesson表添加主键
|
|
|
|
ALTER TABLE `org_lesson`
|
|
|
|
ADD COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT FIRST ,
|
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 17:08:06 +08:00
|
|
|
|
|
|
|
|