upgrade.sql 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. alter table jetplasma_demo_execute add princ_dept bigint null comment '执行负责人部门' after principals;
  2. alter table jetplasma_eco add solution varchar(200) null comment '解决方案' after report;
  3. alter table jetplasma_alteration_apply add enable_eco smallint null comment '是否验证: 1 - 是,0 - 否' after suggest;
  4. update jetplasma_alteration_apply set enable_eco=1 where enable_eco is null;
  5. drop table if exists flow_add_sign_hist;
  6. CREATE TABLE `flow_add_sign_hist` (
  7. `id` bigint(20) not null auto_increment primary key comment '主键ID',
  8. `instance_id` bigint(20) COMMENT '流程实例ID',
  9. `business_id` bigint(20) COMMENT '业务记录编号',
  10. `task_id` bigint(20) COMMENT '任务节点ID',
  11. `user_id` bigint(20) COMMENT '指定审批人',
  12. `user_dept_id` bigint(20) COMMENT '指定审批人部门号',
  13. `create_by` bigint(20) COMMENT '加签人编号',
  14. `create_dept` bigint(20) COMMENT '加签人部门',
  15. `flow_status` tinyint(1) comment '审批结果',
  16. `message` varchar(500) comment '备注信息',
  17. `approve_at` datetime default null comment '审批时间',
  18. `create_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'
  19. ) engine=innodb comment = '加签历史记录表';
  20. alter table jetplasma_alteration_apply add cur_approve varchar(200) null comment '当前审批人' after approve_status;
  21. alter table jetplasma_eco add cur_approve varchar(200) null comment '当前审批人' after approve_status;
  22. delete from sys_job;
  23. delete from sys_job_log;
  24. INSERT INTO jetplasma.sys_job (job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, update_by, update_time, remark) VALUES ('定时发送审批提醒', 'DEFAULT', 'flowTask.sendEmail()', '0 0 12 * * ?', '1', '1', '0', 'admin', '2024-11-02 06:02:28', '', '2024-11-02 06:02:31', '');
  25. alter table jetplasma_device_problem_check add handler varchar(200) null comment '问题处理人';
  26. alter table jetplasma_device_problem_sale add handler varchar(200) null comment '问题处理人';
  27. alter table jetplasma_device_problem_check add handler_dept varchar(200) null comment '问题处理人部门';
  28. alter table jetplasma_device_problem_sale add handler_dept varchar(200) null comment '问题处理人部门';
  29. alter table flow_definition
  30. add auto_pass tinyint null comment '相同审批人是否自动通过, 1 - 是 , 0 - 否' after from_path;
  31. update flow_definition set flow_definition.auto_pass=0;
  32. alter table jetplasma_alteration_apply add create_user bigint null comment '提交人';
  33. alter table jetplasma_eco add create_user bigint null comment '提交人';
  34. alter table jetplasma_eco_meta add create_user bigint null comment '提交人';
  35. alter table jetplasma_ecn add create_user bigint null comment '提交人';
  36. alter table jetplasma_ecn_meta add create_user bigint null comment '提交人';
  37. alter table jetplasma_ecn_spread add create_user bigint null comment '提交人';
  38. alter table jetplasma_ecn_progress add create_user bigint null comment '提交人';
  39. alter table jetplasma_demo add create_user bigint null comment '提交人';
  40. alter table jetplasma_demo_execute add create_user bigint null comment '提交人';
  41. alter table jetplasma_demo_execute_progress add create_user bigint null comment '提交人';
  42. alter table jetplasma_eco
  43. modify report longtext null comment '验证报告';
  44. alter table jetplasma_eco
  45. modify solution longtext null comment '解决方案';
  46. alter table jetplasma_demo
  47. modify attachment longtext null comment '附件';
  48. alter table jetplasma_demo_execute
  49. modify attachment longtext null comment '附件';
  50. alter table jetplasma_alteration_apply
  51. modify attachment longtext null comment '附件';
  52. alter table jetplasma_demo
  53. add submit_at datetime null comment '审批提交时间';
  54. alter table jetplasma_demo
  55. add submit_user bigint null comment '审批提交人';
  56. alter table jetplasma_demo_execute
  57. add submit_at datetime null comment '审批提交时间';
  58. alter table jetplasma_demo_execute
  59. add submit_user bigint null comment '审批提交人';
  60. alter table jetplasma_demo_execute_progress
  61. add submit_at datetime null comment '审批提交时间';
  62. alter table jetplasma_demo_execute_progress
  63. add submit_user bigint null comment '审批提交人';
  64. alter table jetplasma_alteration_apply
  65. add submit_at datetime null comment '审批提交时间';
  66. alter table jetplasma_alteration_apply
  67. add submit_user bigint null comment '审批提交人';
  68. alter table jetplasma_eco
  69. add submit_at datetime null comment '审批提交时间';
  70. alter table jetplasma_eco
  71. add submit_user bigint null comment '审批提交人';
  72. alter table jetplasma_ecn
  73. add submit_at datetime null comment '审批提交时间';
  74. alter table jetplasma_ecn
  75. add submit_user bigint null comment '审批提交人';
  76. drop view if exists jetplasma_demo_execute_view;
  77. create view jetplasma_demo_execute_view as
  78. select e.*, d.customer, d.device_type, d.saler, d.requirements from jetplasma_demo d, jetplasma_demo_execute e where d.id = e.demo_id;
  79. drop view if exists jetplasma_eco_view;
  80. CREATE VIEW jetplasma_eco_view AS
  81. select e.*, jaa.apply_user, jaa.apply_date, jaa.apply_depart from jetplasma_eco e left join jetplasma_alteration_apply jaa on e.alteration_id = jaa.id;
  82. drop view if exists jetplasma_ecn_view;
  83. CREATE VIEW jetplasma_ecn_view AS
  84. select e.*, jaa.apply_user, jaa.apply_depart from jetplasma_ecn e left join jetplasma_alteration_apply jaa on e.alteration_id = jaa.id;
  85. alter table jetplasma_demo add cur_approve varchar(200) null comment '当前审批人' after approve_status;
  86. alter table jetplasma_demo_execute add cur_approve varchar(200) null comment '当前审批人' after approve_status;
  87. drop view if exists jetplasma_demo_execute_view;
  88. create view jetplasma_demo_execute_view as
  89. select e.*, d.customer, d.device_type, d.saler, d.requirements from jetplasma_demo d, jetplasma_demo_execute e where d.id = e.demo_id;