2022-07-14 14:59:31 +08:00
|
|
|
-- 课程表添加字段
|
|
|
|
ALTER TABLE `ls_lesson`
|
|
|
|
ADD COLUMN `org_id` bigint(20) NULL COMMENT '创建者创建这条数据时所属组织' AFTER `update_time`;
|
|
|
|
|
|
|
|
-- 数据处理SQL
|
|
|
|
UPDATE ls_lesson lesson,
|
|
|
|
org_user ou
|
|
|
|
SET lesson.org_id = ou.org_id
|
|
|
|
WHERE
|
|
|
|
lesson.creator_id = ou.user_id
|
|
|
|
AND ou.role = 'Admin'
|
2022-07-14 18:16:44 +08:00
|
|
|
AND lesson.sysFault = 0;
|
2022-07-14 14:59:31 +08:00
|
|
|
|
|
|
|
-- 考试表添加字段
|
|
|
|
ALTER TABLE `exam_definition`
|
|
|
|
ADD COLUMN `org_id` bigint NULL COMMENT '创建者创建这条数据时所属的组织' AFTER `passing_point`;
|
|
|
|
|
|
|
|
-- 数据处理SQL
|
|
|
|
UPDATE exam_definition exam,
|
|
|
|
org_user ou
|
|
|
|
SET exam.org_id = ou.org_id
|
|
|
|
WHERE
|
|
|
|
exam.creator_id = ou.user_id
|
|
|
|
AND ou.role = 'Admin'
|
2022-07-14 18:16:44 +08:00
|
|
|
AND exam.system = 0;
|