
-- ----------------------------
-- Table structure for JOBCLUSTER
-- ----------------------------
CREATE TABLE "JOBCLUSTER" (
                              "ID" NUMBER NOT NULL,
                              "CLUSTERID" VARCHAR2(64 BYTE) NOT NULL,
                              "DESCRIPTION" VARCHAR2(128 BYTE),
                              "STATUS" NUMBER NOT NULL,
                              "UPDATEDTIME" DATE
)
    LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "JOBCLUSTER"."ID" IS 'Id';
COMMENT ON COLUMN "JOBCLUSTER"."CLUSTERID" IS '作业集群Id';
COMMENT ON COLUMN "JOBCLUSTER"."DESCRIPTION" IS '描述信息';
COMMENT ON COLUMN "JOBCLUSTER"."STATUS" IS '状态';
COMMENT ON COLUMN "JOBCLUSTER"."UPDATEDTIME" IS '更新时间';
COMMENT ON TABLE "JOBCLUSTER" IS '系统作业集群表';

-- ----------------------------
-- Records of JOBCLUSTER
-- ----------------------------

-- ----------------------------
-- Table structure for JOBDETAILS
-- ----------------------------
CREATE TABLE "JOBDETAILS" (
                              "ID" NUMBER NOT NULL,
                              "JOBID" VARCHAR2(64 BYTE) NOT NULL,
                              "GROUPNAME" VARCHAR2(128 BYTE),
                              "JOBTYPE" VARCHAR2(128 BYTE),
                              "ASSEMBLYNAME" VARCHAR2(128 BYTE),
                              "DESCRIPTION" VARCHAR2(128 BYTE),
                              "CONCURRENT" NUMBER NOT NULL,
                              "INCLUDEANNOTATIONS" NUMBER NOT NULL,
                              "PROPERTIES" CLOB,
                              "UPDATEDTIME" DATE,
                              "CREATETYPE" NUMBER NOT NULL,
                              "SCRIPTCODE" CLOB,
                              "TENANTID" VARCHAR2(50 BYTE)
)
    LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "JOBDETAILS"."ID" IS 'Id';
COMMENT ON COLUMN "JOBDETAILS"."JOBID" IS '作业Id';
COMMENT ON COLUMN "JOBDETAILS"."GROUPNAME" IS '组名称';
COMMENT ON COLUMN "JOBDETAILS"."JOBTYPE" IS '作业类型';
COMMENT ON COLUMN "JOBDETAILS"."ASSEMBLYNAME" IS '程序集';
COMMENT ON COLUMN "JOBDETAILS"."DESCRIPTION" IS '描述信息';
COMMENT ON COLUMN "JOBDETAILS"."CONCURRENT" IS '是否并行执行';
COMMENT ON COLUMN "JOBDETAILS"."INCLUDEANNOTATIONS" IS '是否扫描特性触发器';
COMMENT ON COLUMN "JOBDETAILS"."PROPERTIES" IS '额外数据';
COMMENT ON COLUMN "JOBDETAILS"."UPDATEDTIME" IS '更新时间';
COMMENT ON COLUMN "JOBDETAILS"."CREATETYPE" IS '作业创建类型';
COMMENT ON COLUMN "JOBDETAILS"."SCRIPTCODE" IS '脚本代码';
COMMENT ON COLUMN "JOBDETAILS"."TENANTID" IS '租户ID';
COMMENT ON TABLE "JOBDETAILS" IS '作业信息表';

-- ----------------------------
-- Records of JOBDETAILS
-- ----------------------------

-- ----------------------------
-- Table structure for JOBTRIGGERS
-- ----------------------------
CREATE TABLE "JOBTRIGGERS" (
                               "ID" NUMBER NOT NULL,
                               "TRIGGERID" VARCHAR2(64 BYTE) NOT NULL,
                               "JOBID" VARCHAR2(64 BYTE) NOT NULL,
                               "TRIGGERTYPE" VARCHAR2(128 BYTE),
                               "ASSEMBLYNAME" VARCHAR2(128 BYTE),
                               "ARGS" VARCHAR2(128 BYTE),
                               "DESCRIPTION" VARCHAR2(128 BYTE),
                               "STATUS" NUMBER NOT NULL,
                               "STARTTIME" DATE,
                               "ENDTIME" DATE,
                               "LASTRUNTIME" DATE,
                               "NEXTRUNTIME" DATE,
                               "NUMBEROFRUNS" NUMBER NOT NULL,
                               "MAXNUMBEROFRUNS" NUMBER NOT NULL,
                               "NUMBEROFERRORS" NUMBER NOT NULL,
                               "MAXNUMBEROFERRORS" NUMBER NOT NULL,
                               "NUMRETRIES" NUMBER NOT NULL,
                               "RETRYTIMEOUT" NUMBER NOT NULL,
                               "STARTNOW" NUMBER NOT NULL,
                               "RUNONSTART" NUMBER NOT NULL,
                               "RESETONLYONCE" NUMBER NOT NULL,
                               "UPDATEDTIME" DATE
)
    LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "JOBTRIGGERS"."ID" IS 'Id';
COMMENT ON COLUMN "JOBTRIGGERS"."TRIGGERID" IS '触发器Id';
COMMENT ON COLUMN "JOBTRIGGERS"."JOBID" IS '作业Id';
COMMENT ON COLUMN "JOBTRIGGERS"."TRIGGERTYPE" IS '触发器类型';
COMMENT ON COLUMN "JOBTRIGGERS"."ASSEMBLYNAME" IS '程序集';
COMMENT ON COLUMN "JOBTRIGGERS"."ARGS" IS '参数';
COMMENT ON COLUMN "JOBTRIGGERS"."DESCRIPTION" IS '描述信息';
COMMENT ON COLUMN "JOBTRIGGERS"."STATUS" IS '状态';
COMMENT ON COLUMN "JOBTRIGGERS"."STARTTIME" IS '起始时间';
COMMENT ON COLUMN "JOBTRIGGERS"."ENDTIME" IS '结束时间';
COMMENT ON COLUMN "JOBTRIGGERS"."LASTRUNTIME" IS '最近运行时间';
COMMENT ON COLUMN "JOBTRIGGERS"."NEXTRUNTIME" IS '下一次运行时间';
COMMENT ON COLUMN "JOBTRIGGERS"."NUMBEROFRUNS" IS '触发次数';
COMMENT ON COLUMN "JOBTRIGGERS"."MAXNUMBEROFRUNS" IS '最大触发次数';
COMMENT ON COLUMN "JOBTRIGGERS"."NUMBEROFERRORS" IS '出错次数';
COMMENT ON COLUMN "JOBTRIGGERS"."MAXNUMBEROFERRORS" IS '最大出错次数';
COMMENT ON COLUMN "JOBTRIGGERS"."NUMRETRIES" IS '重试次数';
COMMENT ON COLUMN "JOBTRIGGERS"."RETRYTIMEOUT" IS '重试间隔时间(ms)';
COMMENT ON COLUMN "JOBTRIGGERS"."STARTNOW" IS '是否立即启动';
COMMENT ON COLUMN "JOBTRIGGERS"."RUNONSTART" IS '是否启动时执行一次';
COMMENT ON COLUMN "JOBTRIGGERS"."RESETONLYONCE" IS '是否在启动时重置最大触发次数等于一次的作业';
COMMENT ON COLUMN "JOBTRIGGERS"."UPDATEDTIME" IS '更新时间';
COMMENT ON TABLE "JOBTRIGGERS" IS '作业触发器表';

-- ----------------------------
-- Records of JOBTRIGGERS
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table JOBCLUSTER
-- ----------------------------
ALTER TABLE "JOBCLUSTER" ADD CONSTRAINT "PK_JOBCLUSTER_ID" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table JOBCLUSTER
-- ----------------------------
ALTER TABLE "JOBCLUSTER" ADD CONSTRAINT "SYS_C0070959" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBCLUSTER" ADD CONSTRAINT "SYS_C0070960" CHECK ("CLUSTERID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBCLUSTER" ADD CONSTRAINT "SYS_C0070961" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table JOBDETAILS
-- ----------------------------
ALTER TABLE "JOBDETAILS" ADD CONSTRAINT "PK_JOBDETAILS_ID" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table JOBDETAILS
-- ----------------------------
ALTER TABLE "JOBDETAILS" ADD CONSTRAINT "SYS_C0070963" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBDETAILS" ADD CONSTRAINT "SYS_C0070964" CHECK ("JOBID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBDETAILS" ADD CONSTRAINT "SYS_C0070965" CHECK ("CONCURRENT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBDETAILS" ADD CONSTRAINT "SYS_C0070966" CHECK ("INCLUDEANNOTATIONS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBDETAILS" ADD CONSTRAINT "SYS_C0070967" CHECK ("CREATETYPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

-- ----------------------------
-- Primary Key structure for table JOBTRIGGERS
-- ----------------------------
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "PK_JOBTRIGGERS_ID" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table JOBTRIGGERS
-- ----------------------------
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070969" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070970" CHECK ("TRIGGERID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070971" CHECK ("JOBID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070972" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070973" CHECK ("NUMBEROFRUNS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070974" CHECK ("MAXNUMBEROFRUNS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070975" CHECK ("NUMBEROFERRORS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070976" CHECK ("MAXNUMBEROFERRORS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070977" CHECK ("NUMRETRIES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070978" CHECK ("RETRYTIMEOUT" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070979" CHECK ("STARTNOW" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070980" CHECK ("RUNONSTART" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "JOBTRIGGERS" ADD CONSTRAINT "SYS_C0070981" CHECK ("RESETONLYONCE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
