drop table if exists sp_act_his;

CREATE TABLE `sp_act_his` (
  `id` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '主键',
  `sp_id` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '状态流程定义',
  `source_state` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '来源状态',
  `target_state` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '目标状态',
  `assignee` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '受理人',
  `change_content` text CHARACTER SET utf8 COMMENT '变更内容',
  `created_time` datetime DEFAULT NULL COMMENT '创建时间',
  `biz_id` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '业务',
  `owner` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT '属主',
  `tenant_id` varchar(32) CHARACTER SET utf8 NOT NULL DEFAULT 'NK' COMMENT '租户',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='状态流程活动历史';