|
@@ -27,57 +27,64 @@ DROP TABLE IF EXISTS QRTZ_TRIGGERS;
|
|
|
DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
|
|
|
DROP TABLE IF EXISTS QRTZ_CALENDARS;
|
|
|
|
|
|
-CREATE TABLE QRTZ_JOB_DETAILS(
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-JOB_NAME character varying(200) NOT NULL,
|
|
|
-JOB_GROUP character varying(200) NOT NULL,
|
|
|
-DESCRIPTION character varying(250) NULL,
|
|
|
-JOB_CLASS_NAME character varying(250) NOT NULL,
|
|
|
-IS_DURABLE boolean NOT NULL,
|
|
|
-IS_NONCONCURRENT boolean NOT NULL,
|
|
|
-IS_UPDATE_DATA boolean NOT NULL,
|
|
|
-REQUESTS_RECOVERY boolean NOT NULL,
|
|
|
-JOB_DATA bytea NULL);
|
|
|
+CREATE TABLE QRTZ_JOB_DETAILS (
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ JOB_NAME character varying(200) NOT NULL,
|
|
|
+ JOB_GROUP character varying(200) NOT NULL,
|
|
|
+ DESCRIPTION character varying(250) NULL,
|
|
|
+ JOB_CLASS_NAME character varying(250) NOT NULL,
|
|
|
+ IS_DURABLE boolean NOT NULL,
|
|
|
+ IS_NONCONCURRENT boolean NOT NULL,
|
|
|
+ IS_UPDATE_DATA boolean NOT NULL,
|
|
|
+ REQUESTS_RECOVERY boolean NOT NULL,
|
|
|
+ JOB_DATA bytea NULL
|
|
|
+);
|
|
|
+
|
|
|
alter table QRTZ_JOB_DETAILS add primary key(SCHED_NAME,JOB_NAME,JOB_GROUP);
|
|
|
|
|
|
CREATE TABLE QRTZ_TRIGGERS (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
-TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
-JOB_NAME character varying(200) NOT NULL,
|
|
|
-JOB_GROUP character varying(200) NOT NULL,
|
|
|
-DESCRIPTION character varying(250) NULL,
|
|
|
-NEXT_FIRE_TIME BIGINT NULL,
|
|
|
-PREV_FIRE_TIME BIGINT NULL,
|
|
|
-PRIORITY INTEGER NULL,
|
|
|
-TRIGGER_STATE character varying(16) NOT NULL,
|
|
|
-TRIGGER_TYPE character varying(8) NOT NULL,
|
|
|
-START_TIME BIGINT NOT NULL,
|
|
|
-END_TIME BIGINT NULL,
|
|
|
-CALENDAR_NAME character varying(200) NULL,
|
|
|
-MISFIRE_INSTR SMALLINT NULL,
|
|
|
-JOB_DATA bytea NULL) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
+ TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
+ JOB_NAME character varying(200) NOT NULL,
|
|
|
+ JOB_GROUP character varying(200) NOT NULL,
|
|
|
+ DESCRIPTION character varying(250) NULL,
|
|
|
+ NEXT_FIRE_TIME BIGINT NULL,
|
|
|
+ PREV_FIRE_TIME BIGINT NULL,
|
|
|
+ PRIORITY INTEGER NULL,
|
|
|
+ TRIGGER_STATE character varying(16) NOT NULL,
|
|
|
+ TRIGGER_TYPE character varying(8) NOT NULL,
|
|
|
+ START_TIME BIGINT NOT NULL,
|
|
|
+ END_TIME BIGINT NULL,
|
|
|
+ CALENDAR_NAME character varying(200) NULL,
|
|
|
+ MISFIRE_INSTR SMALLINT NULL,
|
|
|
+ JOB_DATA bytea NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
|
|
|
|
|
|
CREATE TABLE QRTZ_SIMPLE_TRIGGERS (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
-TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
-REPEAT_COUNT BIGINT NOT NULL,
|
|
|
-REPEAT_INTERVAL BIGINT NOT NULL,
|
|
|
-TIMES_TRIGGERED BIGINT NOT NULL) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
+ TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
+ REPEAT_COUNT BIGINT NOT NULL,
|
|
|
+ REPEAT_INTERVAL BIGINT NOT NULL,
|
|
|
+ TIMES_TRIGGERED BIGINT NOT NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_SIMPLE_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
|
|
|
|
|
|
CREATE TABLE QRTZ_CRON_TRIGGERS (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
-TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
-CRON_EXPRESSION character varying(120) NOT NULL,
|
|
|
-TIME_ZONE_ID character varying(80)) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
+ TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
+ CRON_EXPRESSION character varying(120) NOT NULL,
|
|
|
+ TIME_ZONE_ID character varying(80)
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_CRON_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
|
|
|
|
|
|
-CREATE TABLE QRTZ_SIMPROP_TRIGGERS
|
|
|
- (
|
|
|
+CREATE TABLE QRTZ_SIMPROP_TRIGGERS (
|
|
|
SCHED_NAME character varying(120) NOT NULL,
|
|
|
TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
TRIGGER_GROUP character varying(200) NOT NULL,
|
|
@@ -91,53 +98,67 @@ CREATE TABLE QRTZ_SIMPROP_TRIGGERS
|
|
|
DEC_PROP_1 NUMERIC(13,4) NULL,
|
|
|
DEC_PROP_2 NUMERIC(13,4) NULL,
|
|
|
BOOL_PROP_1 boolean NULL,
|
|
|
- BOOL_PROP_2 boolean NULL) ;
|
|
|
+ BOOL_PROP_2 boolean NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_SIMPROP_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
|
|
|
|
|
|
CREATE TABLE QRTZ_BLOB_TRIGGERS (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
-TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
-BLOB_DATA bytea NULL) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
+ TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
+ BLOB_DATA bytea NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_BLOB_TRIGGERS add primary key(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP);
|
|
|
|
|
|
CREATE TABLE QRTZ_CALENDARS (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-CALENDAR_NAME character varying(200) NOT NULL,
|
|
|
-CALENDAR bytea NOT NULL) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ CALENDAR_NAME character varying(200) NOT NULL,
|
|
|
+ CALENDAR bytea NOT NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_CALENDARS add primary key(SCHED_NAME,CALENDAR_NAME);
|
|
|
|
|
|
CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-TRIGGER_GROUP character varying(200) NOT NULL) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ TRIGGER_GROUP character varying(200) NOT NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_PAUSED_TRIGGER_GRPS add primary key(SCHED_NAME,TRIGGER_GROUP);
|
|
|
|
|
|
CREATE TABLE QRTZ_FIRED_TRIGGERS (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-ENTRY_ID character varying(200) NOT NULL,
|
|
|
-TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
-TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
-INSTANCE_NAME character varying(200) NOT NULL,
|
|
|
-FIRED_TIME BIGINT NOT NULL,
|
|
|
-SCHED_TIME BIGINT NOT NULL,
|
|
|
-PRIORITY INTEGER NOT NULL,
|
|
|
-STATE character varying(16) NOT NULL,
|
|
|
-JOB_NAME character varying(200) NULL,
|
|
|
-JOB_GROUP character varying(200) NULL,
|
|
|
-IS_NONCONCURRENT boolean NULL,
|
|
|
-REQUESTS_RECOVERY boolean NULL) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ ENTRY_ID character varying(200) NOT NULL,
|
|
|
+ TRIGGER_NAME character varying(200) NOT NULL,
|
|
|
+ TRIGGER_GROUP character varying(200) NOT NULL,
|
|
|
+ INSTANCE_NAME character varying(200) NOT NULL,
|
|
|
+ FIRED_TIME BIGINT NOT NULL,
|
|
|
+ SCHED_TIME BIGINT NOT NULL,
|
|
|
+ PRIORITY INTEGER NOT NULL,
|
|
|
+ STATE character varying(16) NOT NULL,
|
|
|
+ JOB_NAME character varying(200) NULL,
|
|
|
+ JOB_GROUP character varying(200) NULL,
|
|
|
+ IS_NONCONCURRENT boolean NULL,
|
|
|
+ REQUESTS_RECOVERY boolean NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_FIRED_TRIGGERS add primary key(SCHED_NAME,ENTRY_ID);
|
|
|
|
|
|
CREATE TABLE QRTZ_SCHEDULER_STATE (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-INSTANCE_NAME character varying(200) NOT NULL,
|
|
|
-LAST_CHECKIN_TIME BIGINT NOT NULL,
|
|
|
-CHECKIN_INTERVAL BIGINT NOT NULL) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ INSTANCE_NAME character varying(200) NOT NULL,
|
|
|
+ LAST_CHECKIN_TIME BIGINT NOT NULL,
|
|
|
+ CHECKIN_INTERVAL BIGINT NOT NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_SCHEDULER_STATE add primary key(SCHED_NAME,INSTANCE_NAME);
|
|
|
|
|
|
CREATE TABLE QRTZ_LOCKS (
|
|
|
-SCHED_NAME character varying(120) NOT NULL,
|
|
|
-LOCK_NAME character varying(40) NOT NULL) ;
|
|
|
+ SCHED_NAME character varying(120) NOT NULL,
|
|
|
+ LOCK_NAME character varying(40) NOT NULL
|
|
|
+) ;
|
|
|
+
|
|
|
alter table QRTZ_LOCKS add primary key(SCHED_NAME,LOCK_NAME);
|
|
|
|
|
|
CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY);
|
|
@@ -471,8 +492,9 @@ CREATE TABLE t_ds_process_instance (
|
|
|
var_pool text ,
|
|
|
PRIMARY KEY (id)
|
|
|
) ;
|
|
|
- create index process_instance_index on t_ds_process_instance (process_definition_code,id);
|
|
|
- create index start_time_index on t_ds_process_instance (start_time);
|
|
|
+
|
|
|
+create index process_instance_index on t_ds_process_instance (process_definition_code,id);
|
|
|
+create index start_time_index on t_ds_process_instance (start_time);
|
|
|
|
|
|
--
|
|
|
-- Table structure for table t_ds_project
|
|
@@ -490,7 +512,8 @@ CREATE TABLE t_ds_project (
|
|
|
update_time timestamp DEFAULT CURRENT_TIMESTAMP ,
|
|
|
PRIMARY KEY (id)
|
|
|
) ;
|
|
|
- create index user_id_index on t_ds_project (user_id);
|
|
|
+
|
|
|
+create index user_id_index on t_ds_project (user_id);
|
|
|
|
|
|
--
|
|
|
-- Table structure for table t_ds_queue
|
|
@@ -613,7 +636,7 @@ CREATE TABLE t_ds_resources (
|
|
|
|
|
|
DROP TABLE IF EXISTS t_ds_schedules;
|
|
|
CREATE TABLE t_ds_schedules (
|
|
|
- id int NOT NULL ,
|
|
|
+ id int NOT NULL ,
|
|
|
process_definition_code bigint NOT NULL ,
|
|
|
start_time timestamp NOT NULL ,
|
|
|
end_time timestamp NOT NULL ,
|
|
@@ -822,9 +845,11 @@ ALTER TABLE t_ds_process_task_relation_log ALTER COLUMN id SET DEFAULT NEXTVAL('
|
|
|
DROP SEQUENCE IF EXISTS t_ds_process_instance_id_sequence;
|
|
|
CREATE SEQUENCE t_ds_process_instance_id_sequence;
|
|
|
ALTER TABLE t_ds_process_instance ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_process_instance_id_sequence');
|
|
|
+
|
|
|
DROP SEQUENCE IF EXISTS t_ds_project_id_sequence;
|
|
|
CREATE SEQUENCE t_ds_project_id_sequence;
|
|
|
ALTER TABLE t_ds_project ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_project_id_sequence');
|
|
|
+
|
|
|
DROP SEQUENCE IF EXISTS t_ds_queue_id_sequence;
|
|
|
CREATE SEQUENCE t_ds_queue_id_sequence;
|
|
|
ALTER TABLE t_ds_queue ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_queue_id_sequence');
|