V1.0.sql 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. INSERT INTO `admin_role` VALUES (1, '管理员', '第二大的权限集合体,仅次于super', 1, 1, '', '2021-01-20 11:34:02');
  2. INSERT INTO `admin_role` VALUES (2, '开发人员', '开发人员,只能看?', 2, 1, '', '2021-01-20 11:34:02');
  3. INSERT INTO `admin_role` VALUES (3, '运营人员', '未分配提现和订单权限', 1, 1, '', '2021-01-20 11:34:03');
  4. INSERT INTO `admin_user`( `account`, `password`, `nameCn`, `nameEn`, `lockFlag`, `delFlag`, `genUid`, `createTime`) VALUES ( 'super', '$2a$10$EfA1I9IMzk9ecGBgT/ig9.vOPbtydB6erkn4117y0s8GI4.V70sHe', '超级管理员', 'superman', 0, 0, 0, now());
  5. INSERT INTO `toktok_stores`.`stores`( `name`, `address`, `manager`, `opt_user`, `create_time`, `update_time`) VALUES ( '米酷店', '广州市天河区万科云城米酷B4栋107-108铺(近天河智慧城地铁B出口)', NULL, '1', now(), NULL);
  6. INSERT INTO `toktok_stores`.`stores`( `name`, `address`, `manager`, `opt_user`, `create_time`, `update_time`) VALUES ( '万胜围店', '广州市海珠区琶洲新村11栋02商铺(近万胜围地铁D出口)', NULL, '1', now(), NULL);
  7. INSERT INTO `toktok_stores`.`stores`( `name`, `address`, `manager`, `opt_user`, `create_time`, `update_time`) VALUES ( '杨箕店', '越秀区杨箕大街富力东山新天地F区商业街109铺', NULL, '1', now(), NULL);
  8. ALTER TABLE `toktok_stores`.`screen_projection`
  9. ADD COLUMN `store_id` bigint(20) NULL COMMENT '门店id' AFTER `id`,
  10. ADD COLUMN `seq` int(10) NOT NULL DEFAULT 0 COMMENT '排序' AFTER `img_url`;
  11. ------------------------------------------------------------------------------------------------------
  12. ALTER TABLE `toktok_stores`.`screen_projection`
  13. ADD COLUMN `carousel_figure` varchar(255) NULL COMMENT '轮播图' AFTER `img_url`;
  14. ------------------------------------------------------------------------------------------------------
  15. ALTER TABLE `toktok_stores`.`dishes_specification`
  16. CHANGE COLUMN `specification` `specification_id` bigint(20) NULL DEFAULT NULL COMMENT '规格id' AFTER `dishes_id`;
  17. ALTER TABLE `toktok_stores`.`dishes_manage`
  18. DROP COLUMN `status`;
  19. ALTER TABLE `toktok_stores`.`dishes_manage`
  20. DROP COLUMN `seq`,
  21. ADD COLUMN `img` varchar(255) NULL COMMENT '图片链接' AFTER `english_name`;
  22. ALTER TABLE `toktok_stores`.`store_account`
  23. ADD COLUMN `bind_store_id` bigint(20) NULL COMMENT '绑定的门店id' AFTER `status`;
  24. -------------------------------------------------------------------------------------------------------
  25. INSERT INTO `toktok_stores`.`stores`( `name`, `address`, `manager`, `opt_user`, `create_time`, `update_time`) VALUES ( '天健店(广氮花园)', '广州市天河区天健汇商业广场A112铺(广氮花园附近)', NULL, '1', now(), NULL);
  26. INSERT INTO `toktok_stores`.`stores`( `name`, `address`, `manager`, `opt_user`, `create_time`, `update_time`) VALUES ( '保利洲际店','广州市海珠区暄悦西街琶洲新村1栋1001铺之一(近万胜围地铁D出口)', NULL, '1', now(), NULL);
  27. -------------------------------------------------------------------------------------------------------
  28. ALTER TABLE `toktok_stores`.`screen_projection`
  29. ADD COLUMN `projection_time` tinyint(2) NOT NULL DEFAULT 1 COMMENT '投影时间,0白天,1夜晚' AFTER `seq`;
  30. --------------------------------------------------------------------------------------------------------------------------------
  31. ALTER TABLE `toktok_stores`.`screen_projection`
  32. ADD COLUMN `cycle_time` int(3) NOT NULL DEFAULT 5 COMMENT '轮播时间' AFTER `carousel_figure`;
  33. --------------------------------------------------------------------------------------------------------------------------------
  34. ALTER TABLE `toktok_stores`.`dishes_manage`
  35. ADD COLUMN `sale_status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '在售状态,1启售,2停售' AFTER `featured`;
  36. --------------------------------------------
  37. ALTER TABLE `toktok_stores`.`clock_group`
  38. ADD COLUMN `loc_titles` varchar(255) NULL COMMENT '打卡地名,多个用;分隔' AFTER `type`;
  39. ALTER TABLE `toktok_stores`.`group_range`
  40. MODIFY COLUMN `targtId` varchar(32) NOT NULL COMMENT '目标id' AFTER `groupId`;
  41. ALTER TABLE `toktok_stores`.`group_range`
  42. CHANGE COLUMN `groupId` `groupid` bigint(20) NOT NULL AFTER `type`,
  43. CHANGE COLUMN `targtId` `targt_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '目标id' AFTER `groupid`;
  44. ALTER TABLE `toktok_stores`.`schedule`
  45. DROP COLUMN `groupid`;
  46. ALTER TABLE `toktok_stores`.`work_schedule`
  47. DROP COLUMN `m_shift_emp_id`,
  48. DROP COLUMN `af_shift_emp_id`,
  49. DROP COLUMN `ev_shift_emp_id`;
  50. ALTER TABLE `toktok_stores`.`work_schedule`
  51. MODIFY COLUMN `worke_date` int(10) NOT NULL COMMENT '排班日期yyyyMMdd' AFTER `id`;
  52. ALTER TABLE `toktok_stores`.`attendance`
  53. ADD COLUMN `attendance_status` tinyint(3) NULL COMMENT '考勤状态 1正常,2时间异常,3地点异常' AFTER `end_part_time`;
  54. ALTER TABLE `toktok_stores`.`attendance`
  55. MODIFY COLUMN `start_part_time` bigint(20) NULL DEFAULT NULL COMMENT '兼职开始时间,表示为距离当天0点的秒数。' AFTER `type`,
  56. MODIFY COLUMN `end_part_time` bigint(20) NULL DEFAULT NULL COMMENT '兼职结束时间,表示为距离当天0点的秒数。' AFTER `start_part_time`;
  57. ALTER TABLE `toktok_stores`.`attendance`
  58. ADD COLUMN `allocate_department_id` bigint(20) NULL COMMENT '调配的门店id' AFTER `remark`,
  59. ADD COLUMN `allocate_department_name` varchar(32) NULL COMMENT '调配的门店名称' AFTER `allocate_department_id`;
  60. ALTER TABLE `toktok_stores`.`attendance`
  61. ADD UNIQUE INDEX `work_schedule_id_and_employee_id`(`work_schedule_id`, `employe_id`) COMMENT 'work_schedule_id_and_employee_id 唯一索引';
  62. ALTER TABLE `toktok_stores`.`work_schedule`
  63. CHANGE COLUMN `worke_date` `work_date` int(10) NOT NULL COMMENT '排班日期yyyyMMdd' AFTER `id`,
  64. ADD UNIQUE INDEX `work_date_and_department_id_index`(`work_date`, `department_id`) COMMENT 'work_date and department_id 唯一索引';
  65. --------------------------------------------------------------------------------------------------------------------------------
  66. ALTER TABLE `toktok_stores`.`beer_properties`
  67. ADD COLUMN `plato` double(10, 0) NULL COMMENT '麦汁浓度' AFTER `ibu`;
  68. ALTER TABLE `toktok_stores`.`beer_properties`
  69. MODIFY COLUMN `plato` double(10, 0) NULL DEFAULT 0 COMMENT '麦汁浓度' AFTER `ibu`;
  70. ALTER TABLE `toktok_stores`.`beer_manage`
  71. MODIFY COLUMN `material_id` varchar(64) NULL DEFAULT NULL COMMENT '啤酒原料信息id,多个之间用;间隔' AFTER `factory_id`;
  72. ALTER TABLE `toktok_stores`.`beer_manage`
  73. MODIFY COLUMN `dishes_id` bigint(20) NOT NULL FIRST;
  74. update `beer_properties` SET plato = 0;
  75. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  76. ALTER TABLE `toktok_stores`.`beer_manage`
  77. DROP COLUMN `beer_name`,
  78. CHANGE COLUMN `dishes_id` `id` bigint(20) NOT NULL AUTO_INCREMENT FIRST,
  79. DROP PRIMARY KEY,
  80. ADD PRIMARY KEY (`id`) USING BTREE;
  81. ALTER TABLE `toktok_stores`.`beer_properties`
  82. CHANGE COLUMN `dishes_id` `beer_id` bigint(20) NOT NULL COMMENT '啤酒id' FIRST,
  83. DROP PRIMARY KEY,
  84. ADD PRIMARY KEY (`beer_id`) USING BTREE;
  85. ALTER TABLE `toktok_stores`.`dishes_manage`
  86. ADD COLUMN `target_id` bigint(20) NULL COMMENT '类型对应的基础数据id' AFTER `type`;
  87. ALTER TABLE `toktok_stores`.`dishes_manage`
  88. ADD UNIQUE INDEX `type_and_target_id_index`(`type`, `target_id`) COMMENT 'type target_id 唯一索引';
  89. -----------------------------------------------------------------------------------------------------------------------------------------------------
  90. ALTER TABLE `toktok_stores`.`stores`
  91. ADD COLUMN `lng` varchar(20) NULL COMMENT '经度' AFTER `address`,
  92. ADD COLUMN `lat` varchar(20) NULL COMMENT '纬度' AFTER `lng`;
  93. ALTER TABLE `toktok_stores`.`stores`
  94. ADD COLUMN `business_start_time` datetime(0) NULL COMMENT '营业开始时间' AFTER `opt_user`,
  95. ADD COLUMN `business_end_time` datetime(0) NULL COMMENT '营业结束时间' AFTER `business_start_time`;
  96. ALTER TABLE `toktok_stores`.`beer_type_manage`
  97. ADD COLUMN `img` varchar(255) NULL COMMENT '图片url' AFTER `introduce`;
  98. ALTER TABLE `toktok_stores`.`stores`
  99. ADD COLUMN `status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '1正常;2停业' AFTER `business_end_time`;
  100. --------------------------------------------------------------------------------------------------------------------------------
  101. ALTER TABLE `toktok_stores`.`quanliang_group`
  102. ADD COLUMN `status` tinyint(3) NULL COMMENT '1正常,2已删除' AFTER `is_watch`;
  103. ALTER TABLE `toktok_stores`.`banner`
  104. MODIFY COLUMN `jump_url` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '跳转地址' AFTER `jump_type`;
  105. ---------------------------------------------------------------------------------------------------------------------------------
  106. ALTER TABLE `toktok_stores`.`meal_standard`
  107. ADD COLUMN `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态1在用,2已删除' AFTER `comment_id`;
  108. ALTER TABLE `toktok_stores`.`meal_standard`
  109. ADD COLUMN `sort` int(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序权重' AFTER `comment_id`;
  110. ---------------------------------------------------------------------------------------------------------------------------------
  111. ALTER TABLE `toktok_stores`.`meal_standard`
  112. ADD COLUMN `key_word` varchar(255) NULL COMMENT '关键词' AFTER `sort`;
  113. ---------------------------------------------------------------------------------------------------------------------------------
  114. ALTER TABLE `toktok_stores`.`stores`
  115. ADD COLUMN `department_id` bigint(20) NULL COMMENT '部门id' AFTER `jump_url`;
  116. ALTER TABLE `toktok_stores`.`employee`
  117. ADD COLUMN `pwd` varchar(18) NULL COMMENT '登录密码' AFTER `main_department`,
  118. ADD COLUMN `temp_exp_date` datetime(0) NULL COMMENT '临时身份过期时间' AFTER `pwd`,
  119. ADD COLUMN `inc_date` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间' AFTER `temp_exp_date`;
  120. ----------------------------------------------------------------------------------------------------------------------------------
  121. ALTER TABLE `toktok_stores`.`dishes_specification`
  122. ADD COLUMN `vip_price` decimal(10, 2) NULL COMMENT '会员价' AFTER `price`;
  123. --------------------------------------------------------------------------------------------------------------------------------
  124. ALTER TABLE `toktok_stores`.`stores`
  125. ADD COLUMN `paper_menu` varchar(800) NULL COMMENT '纸质菜单' AFTER `manager`;
  126. --------------------------------------------------------------------------------------------------------------------------------
  127. ALTER TABLE `toktok_stores`.`quanliang_group`
  128. ADD COLUMN `group_chat_id` varchar(64) NULL COMMENT '企业微信群组id' AFTER `group_id`,
  129. ADD COLUMN `owner_userid` varchar(64) NULL COMMENT '群主' AFTER `owner_name`;
  130. ALTER TABLE `toktok_stores`.`group_chat_send_msg`
  131. ADD COLUMN `send_date` varchar(10) NOT NULL COMMENT '指定消息发送的日期' AFTER `sender_userid`;
  132. ---------------------------------------------------------------------------------------------------------------------------------
  133. ALTER TABLE `toktok_stores`.`screen_projection`
  134. ADD COLUMN `bg_img_url` varchar(255) NULL COMMENT '背景图片' AFTER `img_url`,
  135. ADD COLUMN `video_url` varchar(255) NULL COMMENT '视频地址' AFTER `bg_img_url`,
  136. ADD COLUMN `view_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '展示类型' AFTER `status`;
  137. update screen_projection set view_type = 1 where img_url is null or img_url = "";
  138. update screen_projection set view_type = 2 where (img_url is not null and img_url != "")
  139. and (carousel_figure != "" and carousel_figure is not null);
  140. update screen_projection set view_type = 0 where (img_url is not null and img_url != "")
  141. and (carousel_figure = "" or carousel_figure is null);
  142. ALTER TABLE `toktok_stores`.`screen_projection`
  143. ADD COLUMN `gen_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '自动生成类型' AFTER `view_type`;
  144. update screen_projection set gen_type = 1 where serial_number like '%1' and projection_time = 1;
  145. update screen_projection set gen_type = 1 where serial_number like '%2' and projection_time = 1;
  146. update screen_projection set gen_type = 2 where serial_number like '%3' and projection_time = 1;
  147. update screen_projection set gen_type = 4 where serial_number like '%4' and projection_time = 1;
  148. update screen_projection set gen_type = 3 where serial_number like '%2' and projection_time = 0;
  149. update screen_projection set gen_type = 4 where serial_number like '%3' and projection_time = 0;
  150. update screen_projection set gen_type = 2 where serial_number like '%4' and projection_time = 0;
  151. INSERT INTO `toktok_stores`.`sys_config`( `name`, `value`, `des`, `create_time`, `update_time`) VALUES ('store_menu_day_coffee', 'https://cdn.toktok.beer/menu/fixe_menu/20230525/coffee_nuode.png', '门店白天咖啡菜单', now(), NULL);
  152. INSERT INTO `toktok_stores`.`sys_config`( `name`, `value`, `des`, `create_time`, `update_time`) VALUES ('store_menu_day_fruit_tea', 'https://cdn.toktok.beer/menu/fixe_menu/20230504/tea_menu2.png', '门店白天茶饮菜单', now(), NULL);
  153. INSERT INTO `toktok_stores`.`sys_config`( `name`, `value`, `des`, `create_time`, `update_time`) VALUES ('store_menu_night_fruit_tea', 'https://cdn.toktok.beer/menu/fixe_menu/20230529/night_tea_menu.png', '门店夜晚茶饮菜单', now(), NULL);
  154. --------------------------------------------------------------------------------------------------------------------------------
  155. ALTER TABLE `toktok_stores`.`backlog`
  156. ADD COLUMN `start_time` datetime(0) NOT NULL COMMENT '开始时间' AFTER `type`,
  157. ADD COLUMN `tip_time` datetime(0) NOT NULL COMMENT '提醒时间' AFTER `start_time`;
  158. ALTER TABLE `toktok_stores`.`backlog_bind`
  159. MODIFY COLUMN `imgs` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '图片链接' AFTER `backlog_id`,
  160. ADD COLUMN `start_time` datetime(0) NOT NULL COMMENT '开始时间' AFTER `status`,
  161. ADD COLUMN `tip_time` datetime(0) NOT NULL COMMENT '提醒时间' AFTER `start_time`,
  162. ADD COLUMN `submit_emp_id` bigint(20) NULL COMMENT '提交人' AFTER `tip_time`,
  163. ADD COLUMN `finish_time` datetime(0) NULL COMMENT '完成时间' AFTER `submit_emp_id`;
  164. ALTER TABLE `toktok_stores`.`backlog`
  165. DROP COLUMN `type`,
  166. DROP COLUMN `start_time`,
  167. DROP COLUMN `tip_time`;
  168. ALTER TABLE `toktok_stores`.`backlog_loop_bind`
  169. MODIFY COLUMN `loop_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '循环类型' AFTER `store_id`,
  170. ADD COLUMN `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态' AFTER `loop_type`;
  171. ALTER TABLE `toktok_stores`.`backlog_loop_bind`
  172. CHANGE COLUMN `store_backlog_loop_id` `backlog_loop_bind_id` bigint(20) NOT NULL AUTO_INCREMENT FIRST,
  173. DROP PRIMARY KEY,
  174. ADD PRIMARY KEY (`backlog_loop_bind_id`) USING BTREE;
  175. ALTER TABLE `toktok_stores`.`backlog_bind`
  176. CHANGE COLUMN `store_backlog_id` `backlog_bind_id` bigint(20) NOT NULL AUTO_INCREMENT FIRST,
  177. DROP PRIMARY KEY,
  178. ADD PRIMARY KEY (`backlog_bind_id`) USING BTREE;
  179. ALTER TABLE `toktok_stores`.`backlog_loop_bind`
  180. CHANGE COLUMN `store_id` `busi_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '业务id' AFTER `backlog_id`,
  181. ADD COLUMN `bind_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '绑定类型' AFTER `backlog_id`;
  182. ALTER TABLE `toktok_stores`.`backlog_bind`
  183. CHANGE COLUMN `store_id` `busi_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '门店id' AFTER `backlog_bind_id`,
  184. ADD COLUMN `bind_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '绑定类型' AFTER `backlog_bind_id`;
  185. ALTER TABLE `toktok_stores`.`backlog_bind`
  186. ADD COLUMN `backlog_loop_bind_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '分发绑定待办事项id' AFTER `backlog_id`;
  187. ALTER TABLE `toktok_stores`.`backlog`
  188. CHANGE COLUMN `tittle` `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '事项标题' AFTER `backlog_id`;
  189. ALTER TABLE `toktok_stores`.`backlog_bind`
  190. DROP COLUMN `tip_time`,
  191. ADD COLUMN `cutoff_time` datetime(0) NOT NULL COMMENT '截止时间' AFTER `start_time`;
  192. ALTER TABLE `toktok_stores`.`backlog_loop_bind`
  193. CHANGE COLUMN `tip_time` `cutoff_time` datetime(0) NOT NULL COMMENT '截止时间' AFTER `start_time`;
  194. --------------------------------------------------------------------------------------------------------------------------------
  195. ALTER TABLE `toktok_stores`.`stores`
  196. ADD COLUMN `group_live_code` varchar(255) NULL COMMENT '企业微信群活码' AFTER `status`;
  197. --------------------------------------------------------------------------------------------------------------------------------
  198. ALTER TABLE `toktok_stores`.`group_chat_send_msg`
  199. ADD COLUMN `quanliang_group_id` bigint(20) NULL COMMENT '圈量群组id' AFTER `imgs`;
  200. --------------------------------------------------------------------------------------------------------------------------------------
  201. ALTER TABLE `toktok_stores`.`train_record`
  202. ADD COLUMN `train_plan_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '培训计划编号' AFTER `train_record_id`;
  203. INSERT INTO `toktok_stores`.`sys_config`(`id`, `name`, `value`, `des`, `create_time`, `update_time`) VALUES (15, 'question_template_url', 'https://cdn.toktok.beer/stores/question/template/ce07a810d3f84661baa865464ee98a2d.xlsx', '题库模版链接', '2023-10-11 16:32:36', NULL);
  204. INSERT INTO `toktok_stores`.`sys_config`(`id`, `name`, `value`, `des`, `create_time`, `update_time`) VALUES (16, 'reimbursement_process_url', 'https://cdn.toktok.beer/stores/reimbursement_process/5a3ba1a0702d4ee898edd93f9ee296c8.pdf', '报销流程', '2023-10-11 17:05:48', NULL);
  205. ALTER TABLE `toktok_stores`.`answer_record`
  206. ADD COLUMN `all_opt` varchar(255) NULL COMMENT '所有选项json串' AFTER `right_answer`,
  207. ADD COLUMN `right_opt_ids` varchar(255) NULL COMMENT '正确选项id列表,多个之间用;分隔' AFTER `all_opt`;
  208. ALTER TABLE `toktok_stores`.`train_plan`
  209. ADD COLUMN `status` tinyint(3) NOT NULL COMMENT '可用状态' AFTER `answer_time`;
  210. ALTER TABLE `toktok_stores`.`train_plan`
  211. ADD COLUMN `pass_score` int(10) NOT NULL DEFAULT 0 COMMENT '及格分数' AFTER `answer_time`;
  212. ALTER TABLE `toktok_stores`.`train_record`
  213. ADD COLUMN `pass_status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '及格状态' AFTER `score`;
  214. ALTER TABLE `toktok_stores`.`train_record`
  215. MODIFY COLUMN `score` int(10) NOT NULL DEFAULT '0' COMMENT '分数' AFTER `employee_id`;
  216. ALTER TABLE `toktok_stores`.`train_record`
  217. ADD COLUMN `question_num` int(0) NOT NULL DEFAULT 0 COMMENT '问题数' AFTER `employee_id`,
  218. ADD COLUMN `curr_answer_num` int(0) NOT NULL DEFAULT 0 COMMENT '当前答题数' AFTER `question_num`;
  219. ALTER TABLE `toktok_stores`.`answer_record`
  220. ADD COLUMN `employee_id` bigint(20) NOT NULL AFTER `train_record_id`;
  221. ALTER TABLE `toktok_stores`.`answer_record`
  222. ADD UNIQUE INDEX `record_and_employee_and_question_index`(`train_record_id`, `employee_id`, `question_id`) COMMENT '培训记录id 员工id 问题id 唯一索引';
  223. --------------------------------------------------------------------------------------------------------------------------------
  224. ALTER TABLE `toktok_stores`.`meal_standard_permission`
  225. ADD COLUMN `employee_role_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '角色id' AFTER `meal_standard_ids`;
  226. ALTER TABLE `toktok_stores`.`employee`
  227. ADD COLUMN `employee_role_id` bigint(20) NULL DEFAULT 0 COMMENT '员工角色id' AFTER `extattr`;
  228. ALTER TABLE `toktok_stores`.`meal_standard_permission`
  229. MODIFY COLUMN `meal_standard_ids` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '出餐规范节点id,用;分隔' AFTER `meal_standard_permission_id`;
  230. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  231. ALTER TABLE `toktok_stores`.`stores_dishes`
  232. ADD COLUMN `menu_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '菜单类型' AFTER `dishes_id`;
  233. ALTER TABLE `toktok_stores`.`stores`
  234. MODIFY COLUMN `paper_menu` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '纸质菜单' AFTER `manager`;
  235. ALTER TABLE `toktok_stores`.`stores_dishes`
  236. DROP INDEX `stores_dishes_index`,
  237. ADD INDEX `stores_dishes_index`(`store_id`, `dishes_id`) USING BTREE COMMENT '门店id菜品id索引';