---
# System prepended metadata

title: Untitled

---



---
```
create table job_build_config
(
    id           bigserial not null
        constraint job_build_config_pkey
            primary key,
    job_id       integer   not null,
    build_config text      not null
);


create table job_group
(
    id                 bigserial          not null
        constraint job_group_pkey
            primary key,
    app_name           varchar(64)        not null,
    title              varchar(32)        not null,
    "order"            bigint   default 0 not null,
    address_type       smallint default 0 not null,
    is_public          smallint default 0 not null,
    max_running_number bigint   default 1 not null,
    address_list       varchar(512)
);


create table job_info
(
    id                        bigserial              not null
        constraint job_info_pkey
            primary key,
    job_group                 bigint                 not null,
    job_cron                  varchar(128)           not null,
    job_desc                  varchar(255)           not null,
    job_type                  smallint     default 0 not null,
    add_time                  timestamp,
    update_time               timestamp,
    user_id                   varchar(64),
    author                    varchar(64)  default NULL::character varying,
    alarm_email               varchar(255) default NULL::character varying,
    executor_route_strategy   varchar(50)  default NULL::character varying,
    executor_handler          varchar(255) default NULL::character varying,
    executor_param            varchar(512) default NULL::character varying,
    executor_block_strategy   varchar(50)  default NULL::character varying,
    executor_timeout          bigint       default 0 not null,
    executor_fail_retry_count bigint       default 0 not null,
    glue_type                 varchar(50)            not null,
    glue_source               text,
    glue_remark               varchar(128) default NULL::character varying,
    glue_updatetime           timestamp,
    child_jobid               varchar(255) default NULL::character varying,
    trigger_status            smallint     default 0 not null,
    trigger_last_time         bigint       default 0 not null,
    trigger_next_time         bigint       default 0 not null,
    job_json                  text,
    replace_param             varchar(100) default NULL::character varying,
    jvm_param                 varchar(200) default NULL::character varying,
    inc_start_time            timestamp,
    partition_info            varchar(100) default NULL::character varying,
    last_handle_code          bigint       default '0'::bigint,
    replace_param_type        varchar(255),
    project_id                bigint,
    reader_table              varchar(255),
    primary_key               text,
    inc_start_id              varchar(200),
    increment_type            smallint     default 0,
    datasource_id             bigint
);

create table job_jdbc_datasource
(
    id                bigserial               not null
        constraint job_jdbc_datasource_pkey
            primary key,
    datasource_name   varchar(200)            not null,
    datasource_group  varchar(200)  default 'Default'::character varying,
    connection_params text                    not null,
    type              varchar(45)   default NULL::character varying,
    status            smallint      default 1 not null,
    create_by         varchar(64)   default NULL::character varying,
    create_date       timestamp     default CURRENT_TIMESTAMP(0),
    update_by         varchar(64)   default NULL::character varying,
    subscription_id   varchar(64)   default NULL::character varying,
    update_date       timestamp,
    comments          varchar(1000) default NULL::character varying
);

create table job_lock
(
    lock_name varchar(50) not null
        constraint job_lock_pkey
            primary key
);


create table job_log
(
    id                        bigserial              not null
        constraint job_log_pkey
            primary key,
    job_group                 bigint                 not null,
    job_id                    bigint                 not null,
    project_id                bigint                 not null,
    job_desc                  varchar(255) default NULL::character varying,
    executor_address          varchar(255) default NULL::character varying,
    executor_handler          varchar(255) default NULL::character varying,
    executor_param            varchar(512) default NULL::character varying,
    executor_sharding_param   varchar(20)  default NULL::character varying,
    executor_fail_retry_count bigint       default 0,
    trigger_time              timestamp,
    trigger_code              bigint                 not null,
    trigger_msg               text,
    handle_time               timestamp,
    handle_code               bigint                 not null,
    handle_msg                text,
    alarm_status              smallint     default 0 not null,
    process_id                varchar(20)  default NULL::character varying,
    max_id                    varchar(200)
);
create index i_handle_code on job_log (handle_code);
create index i_trigger_time on job_log (trigger_time);

create table job_log_report
(
    id              bigserial        not null
        constraint job_log_report_pkey
            primary key,
    trigger_day     timestamp,
    running_count   bigint default 0 not null,
    suc_count       bigint default 0 not null,
    fail_count      bigint default 0 not null,
    subscription_id varchar(64)
);
create unique index i_trigger_day on job_log_report (trigger_day);


create table job_logglue
(
    id          bigserial    not null
        constraint job_logglue_pkey
            primary key,
    job_id      bigint       not null,
    glue_type   varchar(50) default NULL::character varying,
    glue_source text,
    glue_remark varchar(128) not null,
    add_time    timestamp,
    update_time timestamp
);

create table job_permission
(
    id          bigserial   not null
        constraint job_permission_pkey
            primary key,
    name        varchar(50) not null,
    description varchar(11)  default NULL::character varying,
    url         varchar(255) default NULL::character varying,
    pid         bigint
);


create table job_project
(
    id              bigserial not null
        constraint job_project_pkey
            primary key,
    name            varchar(100) default NULL::character varying,
    description     varchar(200) default NULL::character varying,
    user_id         varchar(64)  default NULL::character varying,
    subscription_id varchar(64)  default NULL::character varying,
    flag            smallint     default 1,
    create_time     timestamp    default CURRENT_TIMESTAMP(0),
    update_time     timestamp    default CURRENT_TIMESTAMP(0)
);


create table job_registry
(
    id             bigserial    not null
        constraint job_registry_pkey
            primary key,
    registry_group varchar(50)  not null,
    registry_key   varchar(191) not null,
    registry_value varchar(191) not null,
    cpu_usage      double precision,
    memory_usage   double precision,
    load_average   double precision,
    update_time    timestamp
);
create index i_g_k_v on job_registry (registry_group, registry_key, registry_value);

create table job_template
(
    id                        bigserial              not null
        constraint job_template_pkey
            primary key,
    job_group                 bigint                 not null,
    job_cron                  varchar(128)           not null,
    job_desc                  varchar(255)           not null,
    add_time                  timestamp,
    update_time               timestamp,
    subscription_id           varchar(64)            not null,
    alarm_email               varchar(255) default NULL::character varying,
    executor_route_strategy   varchar(50)  default NULL::character varying,
    executor_handler          varchar(255) default NULL::character varying,
    executor_param            varchar(512) default NULL::character varying,
    executor_block_strategy   varchar(50)  default NULL::character varying,
    executor_timeout          bigint       default 0 not null,
    executor_fail_retry_count bigint       default 0 not null,
    glue_type                 varchar(50)            not null,
    glue_source               text,
    glue_remark               varchar(128) default NULL::character varying,
    glue_updatetime           timestamp,
    child_jobid               varchar(255) default NULL::character varying,
    trigger_last_time         bigint       default 0 not null,
    trigger_next_time         bigint       default 0 not null,
    job_json                  text,
    jvm_param                 varchar(200) default NULL::character varying,
    project_id                bigint
);

create table job_user
(
    id         bigserial    not null
        constraint job_user_pkey
            primary key,
    username   varchar(50)  not null,
    password   varchar(100) not null,
    role       varchar(50)  default NULL::character varying,
    permission varchar(255) default NULL::character varying
);
create unique index i_username  on job_user (username);

create table license_info
(
    id             bigserial   not null
        constraint license_info_pkey
            primary key,
    license_id     varchar(64) not null,
    expire_time    varchar(64) not null,
    plan           varchar(16) not null,
    pn             varchar(16) not null,
    license_number varchar(64) not null,
    license_type   varchar(16) not null,
    license_status varchar(64) not null,
    inactive_times varchar(64) not null
);

INSERT INTO job_user VALUES (1, 'admin', '$2a$10$TIog/CJAYSR.scJ5l/EYx.Wo/9qYm5aWqrs6HIXxOmuuqUD0oavMG', 'ROLE_ADMIN', NULL);

INSERT INTO license_info(license_id, expire_time, plan, pn, license_number, license_type, license_status,inactive_times)VALUES ('ews4123337-e64a-4dea-babe-faa5bc1dc3fbensaas-service', 'sujf/dkY/R4xKbaSD6K4Wn87vWk7Hv1P3Se7AD2W3/U=','Cloud-Standard', '980GDIDISS0', 'Noi1IxmOgVDo0+2Ywqeltg==', 'Basic', 'icsOgvm5W29aRQYhnnK4GA==','Noi1IxmOgVDo0+2Ywqeltg==');
insert into job_group(app_name, title,"order",address_type,is_public, max_running_number) values ('batch-executor','batch-executor',1,0,0,2),('executor','executor',2,0,0,2)
```