v3.4.0.sql 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. -- [BI模块] - 王坤 - 20230310 - 数据源表添加模式字段
  2. alter table report_datasource
  3. add column db_schema varchar(255) comment '模式';
  4. -- [BI模块] - 何亚博 - 20230321 - 幻灯片绑定权限组设计的表字段新增
  5. alter table visual_power_point_info
  6. add public_status int default 0 null comment '幻灯片是否公共可见 1:是,0:否';
  7. -- [BI模块] - 何亚博 - 20230321- 三方web嵌入接入权限组涉及的新增字段
  8. alter table visual_login_free_link
  9. add public_status int default 0 null comment '是否公共可见 1:是,0:否';
  10. -- [BI模块] - 何亚博 - 20230321 - 三方web嵌入绑定权限组
  11. drop table if exists visual_login_free_link_permission;
  12. create table visual_login_free_link_permission
  13. (
  14. id int(11) auto_increment primary key comment 'id',
  15. link_id int(11) not null comment '三方接入web的id',
  16. data_perm_id int(11) null comment '权限组id',
  17. create_time datetime default now() null comment '创建时间',
  18. create_by varchar(50) null comment '创建人',
  19. create_user_id bigint(20) null comment '创建人id'
  20. );
  21. -- [BI模块] - 何亚博 - 20230321 - 自主报表公用大屏表新增区分大屏报表字段
  22. alter table visual_data
  23. add visual_data_type int default 0 not null comment '是否为自主报表 1:是,0:否';
  24. -- [BI模块] - 何亚博 - 20230321 - 自主报表分类功能
  25. drop table if exists visual_self_report_category;
  26. create table visual_self_report_category
  27. (
  28. id int auto_increment comment '主键'
  29. primary key,
  30. parent_id int default 0 not null comment '父分类id',
  31. classify_type int(2) null comment '分类类型 1 pc端 2 移动端',
  32. category_key varchar(500) null comment '分类键值',
  33. category_value varchar(64) null comment '分类名称',
  34. is_deleted int(2) default 0 not null comment '是否已删除',
  35. sort_num int(10) default 0 not null comment '排序',
  36. create_user_id bigint default 0 not null comment '创建人ID',
  37. create_time datetime not null comment '创建时间'
  38. ) comment '自主报表分类表';
  39. -- [BI模块] - 何亚博 - 20230321 - 自主报表绑定权限组功能
  40. drop table if exists visual_self_report_permission;
  41. create table visual_self_report_permission
  42. (
  43. id int auto_increment
  44. primary key,
  45. self_report_id int not null comment '报表ID',
  46. data_perm_id int not null comment '权限组ID',
  47. create_time datetime not null comment '创建时间',
  48. create_by varchar(50) not null comment '创建人',
  49. create_user_id bigint not null comment '创建人ID'
  50. ) comment '自主报表权限组';
  51. -- [几何System] - 何亚博 - 20230322 - 记录用户点击菜单,并查询点击量最高的N条数据
  52. drop table if exists user_click_menu_record;
  53. create table user_click_menu_record
  54. (
  55. id int(11) auto_increment primary key not null comment '主键',
  56. menu_id bigint(64) not null comment '菜单id',
  57. click_num int(11) default 1 not null comment '菜单点击量',
  58. click_user_id bigint default 0 comment '菜单点击人',
  59. create_time datetime default now() not null comment '创建时间'
  60. ) comment '人员点击菜单记录表';
  61. -- [BI模块] - 何亚博 - 20230324 - 我的收藏-自主报表
  62. drop table if exists visual_report_category_favourite;
  63. create table visual_report_category_favourite
  64. (
  65. id int auto_increment
  66. primary key,
  67. category_name varchar(100) not null comment '分类名称',
  68. sort_num int default 0 null comment '排序号',
  69. create_user_id bigint not null comment '创建人ID',
  70. create_time datetime default now() not null comment '创建时间'
  71. ) comment '我的收藏-自主报表分类';
  72. -- [项目升级模块] - 何亚博 - 20230324 - 项目升级日志记录
  73. drop table if exists upgrade_project;
  74. create table upgrade_project
  75. (
  76. id int auto_increment
  77. primary key,
  78. project_model varchar(20) null comment '后端项目模块(gmetry-xxljob/gmetry-bi/gmetry-system/gmetry-lowcode/gmetry-pdf)',
  79. project_type int not null comment '项目类型(0:前端,1:后端)',
  80. env_name varchar(20) null comment '.env文件需要修改的模块名称(bi_version/pdf_version/xxljob_version/system_version/lowcode_version)',
  81. old_version varchar(20) null comment '项目旧的版本号',
  82. project_version varchar(20) null comment '项目版本号,修改.env文件需要用到',
  83. upgrade_log text not null comment '升级日志',
  84. result_msg text null comment '部署服务器返回的信息',
  85. upgrade_result int default 0 not null comment '升级结果 1:成功,0:失败',
  86. operation_user_id bigint not null comment '操作人员id',
  87. operation_user_name varchar(50) null comment '操作人员名称',
  88. create_time datetime default now() not null comment '创建时间'
  89. ) comment '项目升级日志记录';
  90. -- [项目升级模块] - 何亚博 - 20230331 - 项目升级模块的数据库修改
  91. drop table if exists upgrade_project_sql;
  92. create table upgrade_project_sql
  93. (
  94. id int auto_increment
  95. primary key,
  96. database_name varchar(20) null comment '修改的数据库名称',
  97. upgrade_log text not null comment '升级日志',
  98. result_msg text null comment '部署服务器返回的信息',
  99. upgrade_result int default 0 not null comment '升级结果 1:成功,0:失败',
  100. operation_user_id bigint not null comment '操作人员id',
  101. operation_user_name varchar(50) null comment '操作人员名称',
  102. create_time datetime default now() not null comment '创建时间'
  103. ) comment 'mysql修改日志记录';
  104. -- [BI模块] - 何亚博 - 20230331 - 我的收藏幻灯片分类
  105. drop table if exists visual_power_classify_favourite;
  106. create table visual_power_classify_favourite
  107. (
  108. id int auto_increment
  109. primary key,
  110. classify_name varchar(100) not null comment '分类名称',
  111. sort_num int default 0 null comment '排序号',
  112. create_user_id bigint not null comment '创建人ID',
  113. create_time datetime not null comment '创建时间'
  114. ) comment '我的收藏-幻灯片分类表';
  115. -- [BI模块] - 何亚博 - 20230331 - 幻灯片归档幻灯片分类
  116. drop table if exists visual_power_classify_archiving;
  117. create table visual_power_classify_archiving
  118. (
  119. id int auto_increment
  120. primary key,
  121. classify_name varchar(100) not null comment '分类名称',
  122. sort_num int default 0 null comment '排序号',
  123. create_user_id bigint not null comment '创建人ID',
  124. create_time datetime not null comment '创建时间'
  125. ) comment '我的归档-分类表';
  126. alter table visual_power_point_info add column visual_type tinyint default 0 not null comment '幻灯片类型(0-普通幻灯片/1-我的收藏/2-归档)';
  127. -- [项目升级模块] - 何亚博 - 20230406 - 项目升级下拉列表
  128. insert into visual_subscribe_notify_conf(attri_key, attri_value, attri_name, notify_type)
  129. values ('bi', 'bi_version', 'bi说明', 6),
  130. ('system', 'system_version', 'system说明', 6),
  131. ('pdf', 'pdf_version', 'pdf说明', 6),
  132. ('lowcode', 'lowcode_version', 'lowcode说明', 6),
  133. ('xxljob', 'xxljob_version', 'xxljob说明', 6),
  134. ('upgrade', 'upgrade_version', 'upgrade说明', 6),
  135. ('bi', 'gemtry-bi', 'bi说明', 7),
  136. ('system', 'gmetry-system', 'system说明', 7),
  137. ('pdf', 'gmetry-pdf', 'pdf说明', 7),
  138. ('lowcode', 'gmetry-lowcode', 'lowcode说明', 7),
  139. ('xxljob', 'gmetry-xxljob', 'xxljob说明', 7),
  140. ('upgrade', 'gemtry-upgrade', 'upgrade说明', 7);
  141. -- [system模块] - 何亚博 - 20230422 - 项目基础信息配置
  142. insert into visual_subscribe_notify_conf(attri_key, attri_value, attri_name, notify_type)
  143. values ('systemName', '', '系统名称', 5),
  144. ('systemVersion', '', '系统版本', 5),
  145. ('loginType', '1', '登录方式', 5),
  146. ('systemLogo', '', '系统LOGO', 5),
  147. ('homeUrl', '', '首页url', 5),
  148. ('isTop', '', '是否启用顶部菜单', 5),
  149. ('apiUrl', '', '接口路径', 5),
  150. ('pdfUrl', '', 'pdf路径', 5),
  151. ('imgUploadUrl', '', '图片上传路径', 5),
  152. ('imgViewUrl', '', '图片预览地址', 5);
  153. -- [system模块] - 何亚博 - 20230406 - 短信登录相关
  154. alter table blade_sms add column business_classify int default 0 not null comment '业务类型(0:告警短信,1:登录短信)';
  155. -- [BI模块] -- 何亚博 -- 20230418 -- 组件历史查询相关sql
  156. drop table if exists visual_component_history_record;
  157. create table visual_component_history_record
  158. (
  159. id int auto_increment
  160. primary key,
  161. visual_id int null comment '大屏id',
  162. setting_info text not null comment '查询条件',
  163. setting_info_md5 varchar(32) null comment '查询条件MD5加密',
  164. component_key varchar(64) null comment '组件key',
  165. operation_user_id bigint not null comment '操作人员id',
  166. operation_user_name varchar(50) null comment '操作人员名称',
  167. create_time datetime default now() not null comment '创建时间'
  168. ) comment '组件查询历史记录表';
  169. -- [system模块] -- 何亚博 -- 20230418 -- 三方登录接口设计的新字段
  170. alter table blade_user add column wechat_open_id varchar(64) null comment '微信三方登录绑定openId';
  171. alter table blade_user add column ding_open_id varchar(64) null comment '钉钉三方登录绑定openId';
  172. alter table blade_user add column qy_wechat_code varchar(64) null comment '企业微信三方登录绑定openId';
  173. alter table blade_user add column fei_shu_open_id varchar(64) null comment '飞书三方登录绑定openId';
  174. -- [bi模块] -- 王坤 -- 20230423 - 全局参数字段长度修改
  175. ALTER TABLE `digital_operation`.`cube_global_param`
  176. MODIFY COLUMN `param_name` varchar(100) NOT NULL COMMENT '参数名称' AFTER `type_id`,
  177. MODIFY COLUMN `param_key` varchar(100) NULL DEFAULT NULL COMMENT '页面参数名' AFTER `param_name`;