sj_retry_task.sql 1.7 KB

123456789101112131415161718192021222324252627282930
  1. create table sj_retry_task
  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. scene_name varchar(64) not null comment '场景名称',
  8. retry_id bigint not null comment '重试信息Id',
  9. ext_attrs text not null comment '扩展字段',
  10. task_status tinyint default 1 not null comment '重试状态',
  11. task_type tinyint default 1 not null comment '任务类型 1、重试数据 2、回调数据',
  12. operation_reason tinyint default 0 not null comment '操作原因',
  13. client_info varchar(128) null comment '客户端地址 clientId#ip:port',
  14. create_dt datetime default CURRENT_TIMESTAMP not null comment '创建时间',
  15. update_dt datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
  16. )
  17. comment '重试任务表';
  18. create index idx_create_dt
  19. on sj_retry_task (create_dt);
  20. create index idx_group_name_scene_name
  21. on sj_retry_task (namespace_id, group_name, scene_name);
  22. create index idx_retry_id
  23. on sj_retry_task (retry_id);
  24. create index task_status
  25. on sj_retry_task (task_status);