sj_job_task_batch.sql 2.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. create table sj_job_task_batch
  2. (
  3. id bigint unsigned auto_increment comment '主键'
  4. primary key,
  5. namespace_id varchar(64) default '764d604ec6fc45f68cd92514c40e9e1a' not null comment '命名空间id',
  6. group_name varchar(64) not null comment '组名称',
  7. job_id bigint not null comment '任务id',
  8. workflow_node_id bigint default 0 not null comment '工作流节点id',
  9. parent_workflow_node_id bigint default 0 not null comment '工作流任务父批次id',
  10. workflow_task_batch_id bigint default 0 not null comment '工作流任务批次id',
  11. task_batch_status tinyint default 0 not null comment '任务批次状态 0、失败 1、成功',
  12. operation_reason tinyint default 0 not null comment '操作原因',
  13. execution_at bigint default 0 not null comment '任务执行时间',
  14. system_task_type tinyint default 3 not null comment '任务类型 3、JOB任务 4、WORKFLOW任务',
  15. parent_id varchar(64) default '' not null comment '父节点',
  16. ext_attrs varchar(256) default '' null comment '扩展字段',
  17. deleted tinyint default 0 not null comment '逻辑删除 1、删除',
  18. create_dt datetime default CURRENT_TIMESTAMP not null comment '创建时间',
  19. update_dt datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
  20. )
  21. comment '任务批次';
  22. create index idx_create_dt
  23. on sj_job_task_batch (create_dt);
  24. create index idx_job_id_task_batch_status
  25. on sj_job_task_batch (job_id, task_batch_status);
  26. create index idx_namespace_id_group_name
  27. on sj_job_task_batch (namespace_id, group_name);
  28. create index idx_workflow_task_batch_id_workflow_node_id
  29. on sj_job_task_batch (workflow_task_batch_id, workflow_node_id);