create table sj_retry_dead_letter
(
    id            bigint unsigned auto_increment comment '主键'
        primary key,
    namespace_id  varchar(64)  default '764d604ec6fc45f68cd92514c40e9e1a' not null comment '命名空间id',
    group_name    varchar(64)                                             not null comment '组名称',
    group_id      bigint                                                  not null comment '组Id',
    scene_name    varchar(64)                                             not null comment '场景名称',
    scene_id      bigint                                                  not null comment '场景ID',
    idempotent_id varchar(64)                                             not null comment '幂等id',
    biz_no        varchar(64)  default ''                                 not null comment '业务编号',
    executor_name varchar(512) default ''                                 not null comment '执行器名称',
    args_str      text                                                    not null comment '执行方法参数',
    ext_attrs     text                                                    not null comment '扩展字段',
    create_dt     datetime     default CURRENT_TIMESTAMP                  not null comment '创建时间'
)
    comment '死信队列表';

create index idx_biz_no
    on sj_retry_dead_letter (biz_no);

create index idx_create_dt
    on sj_retry_dead_letter (create_dt);

create index idx_idempotent_id
    on sj_retry_dead_letter (idempotent_id);

create index idx_namespace_id_group_name_scene_name
    on sj_retry_dead_letter (namespace_id, group_name, scene_name);

