sj_workflow.sql 2.5 KB

1234567891011121314151617181920212223242526272829303132
  1. create table sj_workflow
  2. (
  3. id bigint unsigned auto_increment comment '主键'
  4. primary key,
  5. workflow_name varchar(64) not null comment '工作流名称',
  6. namespace_id varchar(64) default '764d604ec6fc45f68cd92514c40e9e1a' not null comment '命名空间id',
  7. group_name varchar(64) not null comment '组名称',
  8. workflow_status tinyint default 1 not null comment '工作流状态 0、关闭、1、开启',
  9. trigger_type tinyint not null comment '触发类型 1.CRON 表达式 2. 固定时间',
  10. trigger_interval varchar(255) not null comment '间隔时长',
  11. next_trigger_at bigint not null comment '下次触发时间',
  12. block_strategy tinyint default 1 not null comment '阻塞策略 1、丢弃 2、覆盖 3、并行',
  13. executor_timeout int default 0 not null comment '任务执行超时时间,单位秒',
  14. description varchar(256) default '' not null comment '描述',
  15. flow_info text null comment '流程信息',
  16. wf_context text null comment '上下文',
  17. notify_ids varchar(128) default '' not null comment '通知告警场景配置id列表',
  18. bucket_index int default 0 not null comment 'bucket',
  19. version int not null comment '版本号',
  20. ext_attrs varchar(256) default '' null comment '扩展字段',
  21. deleted tinyint default 0 not null comment '逻辑删除 1、删除',
  22. create_dt datetime default CURRENT_TIMESTAMP not null comment '创建时间',
  23. update_dt datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
  24. )
  25. comment '工作流';
  26. create index idx_create_dt
  27. on sj_workflow (create_dt);
  28. create index idx_namespace_id_group_name
  29. on sj_workflow (namespace_id, group_name);