From 4625b633e73877ab11a2bde6b9368b7d92dde855 Mon Sep 17 00:00:00 2001 From: mvdstruijk Date: Fri, 10 Jul 2020 11:21:17 +0200 Subject: [PATCH] DB scripts fixed --- .../database/5.2.1/README.md | 18 + .../database/5.2.1/insert-beheerder.sql | 4 + .../database/5.2.1/qtz_tables_oracle.sql | 168 +++++++ .../database/5.2.1/qtz_tables_postgres.sql | 175 +++++++ .../database/schema-export-oracle.sql | 175 ------- .../database/schema_export-postgres.sql | 460 ------------------ .../update_wfst_support_oracle.sql | 0 .../update_wfst_support_postgres.sql | 0 8 files changed, 365 insertions(+), 635 deletions(-) create mode 100644 datastorelinkerEntities/database/5.2.1/README.md create mode 100644 datastorelinkerEntities/database/5.2.1/insert-beheerder.sql create mode 100644 datastorelinkerEntities/database/5.2.1/qtz_tables_oracle.sql create mode 100644 datastorelinkerEntities/database/5.2.1/qtz_tables_postgres.sql delete mode 100644 datastorelinkerEntities/database/schema-export-oracle.sql delete mode 100644 datastorelinkerEntities/database/schema_export-postgres.sql rename datastorelinkerEntities/database/{update wfst => update 5.0 to 5.2.1}/update_wfst_support_oracle.sql (100%) rename datastorelinkerEntities/database/{update wfst => update 5.0 to 5.2.1}/update_wfst_support_postgres.sql (100%) diff --git a/datastorelinkerEntities/database/5.2.1/README.md b/datastorelinkerEntities/database/5.2.1/README.md new file mode 100644 index 00000000..80b9068c --- /dev/null +++ b/datastorelinkerEntities/database/5.2.1/README.md @@ -0,0 +1,18 @@ +# DSL datamodel + +De qtz_*.sql scripts hebben de benodigde tabellen ed. voor de taakplanner, +deze komen uit de Quartz download: http://www.quartz-scheduler.org/downloads/ + +Let op dat bij een library upgrade ook deze scripts worden bijgewerkt. + +De *-schema-export.sql bevat de met hibernate export gegenereerde tabellen ed. +Deze worden tijdens de maven build gemaakt de schema export plugin die +de persistence.xml uit het datastolinker war project gebruikt. +De gemaakt sql staat dan in de target/schema-export directory. + +de volgorde van uitvoeren van de scripts: + + - schema-export-.sql + - qtz_tables_.sql + - insert-beheerder.sql + diff --git a/datastorelinkerEntities/database/5.2.1/insert-beheerder.sql b/datastorelinkerEntities/database/5.2.1/insert-beheerder.sql new file mode 100644 index 00000000..7988f743 --- /dev/null +++ b/datastorelinkerEntities/database/5.2.1/insert-beheerder.sql @@ -0,0 +1,4 @@ +-- insert default beheerder // beheerder account, password = beheerder +insert into organization(id, name, upload_path) values (1, 'Beheerders', '/'); +insert into users(id, name, password, is_admin) values (1, 'beheerder', '1ZkPjF0ZNpQOXRr0TImwog%3D%3D', true); +insert into organization_users(organization_id, users_id) values (1, 1); diff --git a/datastorelinkerEntities/database/5.2.1/qtz_tables_oracle.sql b/datastorelinkerEntities/database/5.2.1/qtz_tables_oracle.sql new file mode 100644 index 00000000..cdcc7437 --- /dev/null +++ b/datastorelinkerEntities/database/5.2.1/qtz_tables_oracle.sql @@ -0,0 +1,168 @@ +-- +-- A hint submitted by a user: Oracle DB MUST be created as "shared" and the +-- job_queue_processes parameter must be greater than 2 +-- However, these settings are pretty much standard after any +-- Oracle install, so most users need not worry about this. +-- +-- Many other users (including the primary author of Quartz) have had success +-- runing in dedicated mode, so only consider the above as a hint ;-) +-- + +CREATE TABLE qrtz_job_details + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + JOB_NAME VARCHAR2(200) NOT NULL, + JOB_GROUP VARCHAR2(200) NOT NULL, + DESCRIPTION VARCHAR2(250) NULL, + JOB_CLASS_NAME VARCHAR2(250) NOT NULL, + IS_DURABLE VARCHAR2(1) NOT NULL, + IS_NONCONCURRENT VARCHAR2(1) NOT NULL, + IS_UPDATE_DATA VARCHAR2(1) NOT NULL, + REQUESTS_RECOVERY VARCHAR2(1) NOT NULL, + JOB_DATA BLOB NULL, + CONSTRAINT QRTZ_JOB_DETAILS_PK PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) +); +CREATE TABLE qrtz_triggers + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + TRIGGER_NAME VARCHAR2(200) NOT NULL, + TRIGGER_GROUP VARCHAR2(200) NOT NULL, + JOB_NAME VARCHAR2(200) NOT NULL, + JOB_GROUP VARCHAR2(200) NOT NULL, + DESCRIPTION VARCHAR2(250) NULL, + NEXT_FIRE_TIME NUMBER(13) NULL, + PREV_FIRE_TIME NUMBER(13) NULL, + PRIORITY NUMBER(13) NULL, + TRIGGER_STATE VARCHAR2(16) NOT NULL, + TRIGGER_TYPE VARCHAR2(8) NOT NULL, + START_TIME NUMBER(13) NOT NULL, + END_TIME NUMBER(13) NULL, + CALENDAR_NAME VARCHAR2(200) NULL, + MISFIRE_INSTR NUMBER(2) NULL, + JOB_DATA BLOB NULL, + CONSTRAINT QRTZ_TRIGGERS_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + CONSTRAINT QRTZ_TRIGGER_TO_JOBS_FK FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) + REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP) +); +CREATE TABLE qrtz_simple_triggers + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + TRIGGER_NAME VARCHAR2(200) NOT NULL, + TRIGGER_GROUP VARCHAR2(200) NOT NULL, + REPEAT_COUNT NUMBER(7) NOT NULL, + REPEAT_INTERVAL NUMBER(12) NOT NULL, + TIMES_TRIGGERED NUMBER(10) NOT NULL, + CONSTRAINT QRTZ_SIMPLE_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + CONSTRAINT QRTZ_SIMPLE_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) + REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) +); +CREATE TABLE qrtz_cron_triggers + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + TRIGGER_NAME VARCHAR2(200) NOT NULL, + TRIGGER_GROUP VARCHAR2(200) NOT NULL, + CRON_EXPRESSION VARCHAR2(120) NOT NULL, + TIME_ZONE_ID VARCHAR2(80), + CONSTRAINT QRTZ_CRON_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + CONSTRAINT QRTZ_CRON_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) + REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) +); +CREATE TABLE qrtz_simprop_triggers + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + TRIGGER_NAME VARCHAR2(200) NOT NULL, + TRIGGER_GROUP VARCHAR2(200) NOT NULL, + STR_PROP_1 VARCHAR2(512) NULL, + STR_PROP_2 VARCHAR2(512) NULL, + STR_PROP_3 VARCHAR2(512) NULL, + INT_PROP_1 NUMBER(10) NULL, + INT_PROP_2 NUMBER(10) NULL, + LONG_PROP_1 NUMBER(13) NULL, + LONG_PROP_2 NUMBER(13) NULL, + DEC_PROP_1 NUMERIC(13,4) NULL, + DEC_PROP_2 NUMERIC(13,4) NULL, + BOOL_PROP_1 VARCHAR2(1) NULL, + BOOL_PROP_2 VARCHAR2(1) NULL, + CONSTRAINT QRTZ_SIMPROP_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + CONSTRAINT QRTZ_SIMPROP_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) + REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) +); +CREATE TABLE qrtz_blob_triggers + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + TRIGGER_NAME VARCHAR2(200) NOT NULL, + TRIGGER_GROUP VARCHAR2(200) NOT NULL, + BLOB_DATA BLOB NULL, + CONSTRAINT QRTZ_BLOB_TRIG_PK PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + CONSTRAINT QRTZ_BLOB_TRIG_TO_TRIG_FK FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) + REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) +); +CREATE TABLE qrtz_calendars + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + CALENDAR_NAME VARCHAR2(200) NOT NULL, + CALENDAR BLOB NOT NULL, + CONSTRAINT QRTZ_CALENDARS_PK PRIMARY KEY (SCHED_NAME,CALENDAR_NAME) +); +CREATE TABLE qrtz_paused_trigger_grps + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + TRIGGER_GROUP VARCHAR2(200) NOT NULL, + CONSTRAINT QRTZ_PAUSED_TRIG_GRPS_PK PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP) +); +CREATE TABLE qrtz_fired_triggers + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + ENTRY_ID VARCHAR2(95) NOT NULL, + TRIGGER_NAME VARCHAR2(200) NOT NULL, + TRIGGER_GROUP VARCHAR2(200) NOT NULL, + INSTANCE_NAME VARCHAR2(200) NOT NULL, + FIRED_TIME NUMBER(13) NOT NULL, + SCHED_TIME NUMBER(13) NOT NULL, + PRIORITY NUMBER(13) NOT NULL, + STATE VARCHAR2(16) NOT NULL, + JOB_NAME VARCHAR2(200) NULL, + JOB_GROUP VARCHAR2(200) NULL, + IS_NONCONCURRENT VARCHAR2(1) NULL, + REQUESTS_RECOVERY VARCHAR2(1) NULL, + CONSTRAINT QRTZ_FIRED_TRIGGER_PK PRIMARY KEY (SCHED_NAME,ENTRY_ID) +); +CREATE TABLE qrtz_scheduler_state + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + INSTANCE_NAME VARCHAR2(200) NOT NULL, + LAST_CHECKIN_TIME NUMBER(13) NOT NULL, + CHECKIN_INTERVAL NUMBER(13) NOT NULL, + CONSTRAINT QRTZ_SCHEDULER_STATE_PK PRIMARY KEY (SCHED_NAME,INSTANCE_NAME) +); +CREATE TABLE qrtz_locks + ( + SCHED_NAME VARCHAR2(120) NOT NULL, + LOCK_NAME VARCHAR2(40) NOT NULL, + CONSTRAINT QRTZ_LOCKS_PK PRIMARY KEY (SCHED_NAME,LOCK_NAME) +); + +create index idx_qrtz_j_req_recovery on qrtz_job_details(SCHED_NAME,REQUESTS_RECOVERY); +create index idx_qrtz_j_grp on qrtz_job_details(SCHED_NAME,JOB_GROUP); + +create index idx_qrtz_t_j on qrtz_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); +create index idx_qrtz_t_jg on qrtz_triggers(SCHED_NAME,JOB_GROUP); +create index idx_qrtz_t_c on qrtz_triggers(SCHED_NAME,CALENDAR_NAME); +create index idx_qrtz_t_g on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP); +create index idx_qrtz_t_state on qrtz_triggers(SCHED_NAME,TRIGGER_STATE); +create index idx_qrtz_t_n_state on qrtz_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); +create index idx_qrtz_t_n_g_state on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); +create index idx_qrtz_t_next_fire_time on qrtz_triggers(SCHED_NAME,NEXT_FIRE_TIME); +create index idx_qrtz_t_nft_st on qrtz_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); +create index idx_qrtz_t_nft_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); +create index idx_qrtz_t_nft_st_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); +create index idx_qrtz_t_nft_st_misfire_grp on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); + +create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME); +create index idx_qrtz_ft_inst_job_req_rcvry on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); +create index idx_qrtz_ft_j_g on qrtz_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); +create index idx_qrtz_ft_jg on qrtz_fired_triggers(SCHED_NAME,JOB_GROUP); +create index idx_qrtz_ft_t_g on qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); +create index idx_qrtz_ft_tg on qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP); + + diff --git a/datastorelinkerEntities/database/5.2.1/qtz_tables_postgres.sql b/datastorelinkerEntities/database/5.2.1/qtz_tables_postgres.sql new file mode 100644 index 00000000..5cbe14d8 --- /dev/null +++ b/datastorelinkerEntities/database/5.2.1/qtz_tables_postgres.sql @@ -0,0 +1,175 @@ +-- Thanks to Patrick Lightbody for submitting this... +-- +-- In your Quartz properties file, you'll need to set +-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate + +CREATE TABLE qrtz_job_details + ( + SCHED_NAME VARCHAR(120) NOT NULL, + JOB_NAME VARCHAR(200) NOT NULL, + JOB_GROUP VARCHAR(200) NOT NULL, + DESCRIPTION VARCHAR(250) NULL, + JOB_CLASS_NAME VARCHAR(250) NOT NULL, + IS_DURABLE BOOL NOT NULL, + IS_NONCONCURRENT BOOL NOT NULL, + IS_UPDATE_DATA BOOL NOT NULL, + REQUESTS_RECOVERY BOOL NOT NULL, + JOB_DATA BYTEA NULL, + PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) +); + +CREATE TABLE qrtz_triggers + ( + SCHED_NAME VARCHAR(120) NOT NULL, + TRIGGER_NAME VARCHAR(200) NOT NULL, + TRIGGER_GROUP VARCHAR(200) NOT NULL, + JOB_NAME VARCHAR(200) NOT NULL, + JOB_GROUP VARCHAR(200) NOT NULL, + DESCRIPTION VARCHAR(250) NULL, + NEXT_FIRE_TIME BIGINT NULL, + PREV_FIRE_TIME BIGINT NULL, + PRIORITY INTEGER NULL, + TRIGGER_STATE VARCHAR(16) NOT NULL, + TRIGGER_TYPE VARCHAR(8) NOT NULL, + START_TIME BIGINT NOT NULL, + END_TIME BIGINT NULL, + CALENDAR_NAME VARCHAR(200) NULL, + MISFIRE_INSTR SMALLINT NULL, + JOB_DATA BYTEA NULL, + PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) + REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP) +); + +CREATE TABLE qrtz_simple_triggers + ( + SCHED_NAME VARCHAR(120) NOT NULL, + TRIGGER_NAME VARCHAR(200) NOT NULL, + TRIGGER_GROUP VARCHAR(200) NOT NULL, + REPEAT_COUNT BIGINT NOT NULL, + REPEAT_INTERVAL BIGINT NOT NULL, + TIMES_TRIGGERED BIGINT NOT NULL, + PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) + REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) +); + +CREATE TABLE qrtz_cron_triggers + ( + SCHED_NAME VARCHAR(120) NOT NULL, + TRIGGER_NAME VARCHAR(200) NOT NULL, + TRIGGER_GROUP VARCHAR(200) NOT NULL, + CRON_EXPRESSION VARCHAR(120) NOT NULL, + TIME_ZONE_ID VARCHAR(80), + PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) + REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) +); + +CREATE TABLE qrtz_simprop_triggers + ( + SCHED_NAME VARCHAR(120) NOT NULL, + TRIGGER_NAME VARCHAR(200) NOT NULL, + TRIGGER_GROUP VARCHAR(200) NOT NULL, + STR_PROP_1 VARCHAR(512) NULL, + STR_PROP_2 VARCHAR(512) NULL, + STR_PROP_3 VARCHAR(512) NULL, + INT_PROP_1 INT NULL, + INT_PROP_2 INT NULL, + LONG_PROP_1 BIGINT NULL, + LONG_PROP_2 BIGINT NULL, + DEC_PROP_1 NUMERIC(13,4) NULL, + DEC_PROP_2 NUMERIC(13,4) NULL, + BOOL_PROP_1 BOOL NULL, + BOOL_PROP_2 BOOL NULL, + PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) + REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) +); + +CREATE TABLE qrtz_blob_triggers + ( + SCHED_NAME VARCHAR(120) NOT NULL, + TRIGGER_NAME VARCHAR(200) NOT NULL, + TRIGGER_GROUP VARCHAR(200) NOT NULL, + BLOB_DATA BYTEA NULL, + PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), + FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) + REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) +); + +CREATE TABLE qrtz_calendars + ( + SCHED_NAME VARCHAR(120) NOT NULL, + CALENDAR_NAME VARCHAR(200) NOT NULL, + CALENDAR BYTEA NOT NULL, + PRIMARY KEY (SCHED_NAME,CALENDAR_NAME) +); + + +CREATE TABLE qrtz_paused_trigger_grps + ( + SCHED_NAME VARCHAR(120) NOT NULL, + TRIGGER_GROUP VARCHAR(200) NOT NULL, + PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP) +); + +CREATE TABLE qrtz_fired_triggers + ( + SCHED_NAME VARCHAR(120) NOT NULL, + ENTRY_ID VARCHAR(95) NOT NULL, + TRIGGER_NAME VARCHAR(200) NOT NULL, + TRIGGER_GROUP VARCHAR(200) NOT NULL, + INSTANCE_NAME VARCHAR(200) NOT NULL, + FIRED_TIME BIGINT NOT NULL, + SCHED_TIME BIGINT NOT NULL, + PRIORITY INTEGER NOT NULL, + STATE VARCHAR(16) NOT NULL, + JOB_NAME VARCHAR(200) NULL, + JOB_GROUP VARCHAR(200) NULL, + IS_NONCONCURRENT BOOL NULL, + REQUESTS_RECOVERY BOOL NULL, + PRIMARY KEY (SCHED_NAME,ENTRY_ID) +); + +CREATE TABLE qrtz_scheduler_state + ( + SCHED_NAME VARCHAR(120) NOT NULL, + INSTANCE_NAME VARCHAR(200) NOT NULL, + LAST_CHECKIN_TIME BIGINT NOT NULL, + CHECKIN_INTERVAL BIGINT NOT NULL, + PRIMARY KEY (SCHED_NAME,INSTANCE_NAME) +); + +CREATE TABLE qrtz_locks + ( + SCHED_NAME VARCHAR(120) NOT NULL, + LOCK_NAME VARCHAR(40) NOT NULL, + PRIMARY KEY (SCHED_NAME,LOCK_NAME) +); + +create index idx_qrtz_j_req_recovery on qrtz_job_details(SCHED_NAME,REQUESTS_RECOVERY); +create index idx_qrtz_j_grp on qrtz_job_details(SCHED_NAME,JOB_GROUP); + +create index idx_qrtz_t_j on qrtz_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); +create index idx_qrtz_t_jg on qrtz_triggers(SCHED_NAME,JOB_GROUP); +create index idx_qrtz_t_c on qrtz_triggers(SCHED_NAME,CALENDAR_NAME); +create index idx_qrtz_t_g on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP); +create index idx_qrtz_t_state on qrtz_triggers(SCHED_NAME,TRIGGER_STATE); +create index idx_qrtz_t_n_state on qrtz_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); +create index idx_qrtz_t_n_g_state on qrtz_triggers(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); +create index idx_qrtz_t_next_fire_time on qrtz_triggers(SCHED_NAME,NEXT_FIRE_TIME); +create index idx_qrtz_t_nft_st on qrtz_triggers(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); +create index idx_qrtz_t_nft_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); +create index idx_qrtz_t_nft_st_misfire on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); +create index idx_qrtz_t_nft_st_misfire_grp on qrtz_triggers(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); + +create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME); +create index idx_qrtz_ft_inst_job_req_rcvry on qrtz_fired_triggers(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); +create index idx_qrtz_ft_j_g on qrtz_fired_triggers(SCHED_NAME,JOB_NAME,JOB_GROUP); +create index idx_qrtz_ft_jg on qrtz_fired_triggers(SCHED_NAME,JOB_GROUP); +create index idx_qrtz_ft_t_g on qrtz_fired_triggers(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); +create index idx_qrtz_ft_tg on qrtz_fired_triggers(SCHED_NAME,TRIGGER_GROUP); + + +commit; diff --git a/datastorelinkerEntities/database/schema-export-oracle.sql b/datastorelinkerEntities/database/schema-export-oracle.sql deleted file mode 100644 index 73df8adb..00000000 --- a/datastorelinkerEntities/database/schema-export-oracle.sql +++ /dev/null @@ -1,175 +0,0 @@ - - create table database_inout ( - id number(19,0) not null, - db_alias varchar2(255 char), - buffersize varchar2(255 char), - col_x varchar2(255 char), - col_y varchar2(255 char), - database_name varchar2(255 char), - host_name varchar2(255 char), - name varchar2(255 char), - organization_id number(10,0), - password varchar2(255 char), - port number(10,0), - db_schema varchar2(255 char), - srs varchar2(255 char), - timeout varchar2(255 char), - database_type varchar2(255 char) not null, - inout_type varchar2(255 char) not null, - url varchar2(255 char), - user_id number(10,0), - username varchar2(255 char), - webservice_db number(1,0) not null, - primary key (id) - ); - - create table input_output ( - id number(19,0) not null, - input_output_datatype varchar2(255 char) not null, - file_name varchar2(255 char), - name varchar2(255 char), - organization_id number(10,0), - srs varchar2(255 char), - table_name varchar2(255 char), - template_output varchar2(255 char), - input_output_type varchar2(255 char) not null, - user_id number(10,0), - database_id number(19,0), - primary key (id) - ); - - create table mail ( - id number(19,0) not null, - from_email_address varchar2(255 char), - smtp_host varchar2(255 char), - subject varchar2(255 char), - to_email_address varchar2(255 char) not null, - primary key (id) - ); - - create table organization ( - id number(10,0) not null, - name varchar2(255 char) not null, - upload_path varchar2(255 char) not null, - primary key (id) - ); - - create table organization_users ( - organization_id number(10,0), - users_id number(10,0) not null, - primary key (users_id), - unique (users_id) - ); - - create table output_organization ( - organization_id number(10,0) not null, - output_id number(19,0) not null - ); - - create table process ( - id number(19,0) not null, - actions clob not null, - append_table number(1,0) not null, - drop_table number(1,0) not null, - features_end number(10,0), - features_start number(10,0), - filter varchar2(255 char), - modify_table number(1,0) not null, - modify_filter varchar2(255 char), - modify_geom number(1,0) not null, - name varchar2(255 char), - organization_id number(10,0), - remarks varchar2(255 char), - user_id number(10,0), - user_name varchar2(255 char), - writer_type varchar2(255 char) not null, - input_id number(19,0) not null, - linked_process number(19,0), - mail_id number(19,0) not null, - output_id number(19,0) not null, - process_status_id number(19,0) not null, - schedule number(19,0), - primary key (id) - ); - - create table process_status ( - id number(19,0) not null, - executing_job_uuid varchar2(255 char), - message clob, - process_status_type varchar2(255 char) not null, - primary key (id) - ); - - create table schedule ( - id number(19,0) not null, - cron_expression varchar2(120 char) not null, - from_date date, - job_name varchar2(120 char) not null, - schedule_type varchar2(255 char) not null, - primary key (id) - ); - - create table users ( - id number(10,0) not null, - is_admin number(1,0) not null, - name varchar2(255 char) not null, - password varchar2(255 char) not null, - primary key (id) - ); - - alter table input_output - add constraint FK3D134716341B5076 - foreign key (database_id) - references database_inout; - - alter table organization_users - add constraint FKDABFEBFCA0C96776 - foreign key (organization_id) - references organization; - - alter table organization_users - add constraint FKDABFEBFC8BF8659E - foreign key (users_id) - references users; - - alter table output_organization - add constraint FK7301A7B11CCF9206 - foreign key (output_id) - references input_output; - - alter table output_organization - add constraint FK7301A7B1A0C96776 - foreign key (organization_id) - references organization; - - alter table process - add constraint FKED8D1E6F4594B9CA - foreign key (schedule) - references schedule; - - alter table process - add constraint FKED8D1E6F80DCC4F6 - foreign key (mail_id) - references mail; - - alter table process - add constraint FKED8D1E6F3E7EC89C - foreign key (linked_process) - references process; - - alter table process - add constraint FKED8D1E6F1CCF9206 - foreign key (output_id) - references input_output; - - alter table process - add constraint FKED8D1E6F5B1356DD - foreign key (process_status_id) - references process_status; - - alter table process - add constraint FKED8D1E6FB72FF29D - foreign key (input_id) - references input_output; - - create sequence hibernate_sequence; diff --git a/datastorelinkerEntities/database/schema_export-postgres.sql b/datastorelinkerEntities/database/schema_export-postgres.sql deleted file mode 100644 index 12c5aa8d..00000000 --- a/datastorelinkerEntities/database/schema_export-postgres.sql +++ /dev/null @@ -1,460 +0,0 @@ --- --- PostgreSQL database dump --- NB onbekende versie --- - - -CREATE TABLE database_inout ( - id bigint NOT NULL, - db_alias character varying(255), - col_x character varying(255), - col_y character varying(255), - database_name character varying(255), - host_name character varying(255), - name character varying(255), - organization_id integer, - password character varying(255), - port integer, - db_schema character varying(255), - srs character varying(255), - buffersize character varying(255), - timeout character varying(255), - database_type character varying(255) NOT NULL, - inout_type character varying(255) NOT NULL, - url character varying(255), - user_id integer, - username character varying(255), - webservice_db boolean NOT NULL -); - - -CREATE SEQUENCE hibernate_sequence - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -CREATE TABLE input_output ( - id bigint NOT NULL, - input_output_datatype character varying(255) NOT NULL, - file_name character varying(255), - name character varying(255), - organization_id integer, - srs character varying(255), - table_name character varying(255), - template_output character varying(255), - input_output_type character varying(255) NOT NULL, - user_id integer, - database_id bigint -); - - -CREATE TABLE mail ( - id bigint NOT NULL, - from_email_address character varying(255), - smtp_host character varying(255), - subject character varying(255), - to_email_address character varying(255) NOT NULL -); - - -CREATE TABLE organization ( - id integer NOT NULL, - name character varying(255) NOT NULL, - upload_path character varying(255) NOT NULL -); - - - -CREATE TABLE organization_users ( - organization_id integer, - users_id integer NOT NULL -); - - -CREATE TABLE output_organization ( - organization_id integer NOT NULL, - output_id bigint NOT NULL -); - - - -CREATE TABLE post_action ( - id integer NOT NULL, - class_name character varying(255) NOT NULL, - label character varying(255) NOT NULL -); - - -CREATE TABLE post_action_param ( - id integer NOT NULL, - param character varying(255) NOT NULL, - value character varying(255) NOT NULL -); - - - -CREATE TABLE process ( - id bigint NOT NULL, - actions text NOT NULL, - append_table boolean NOT NULL, - drop_table boolean NOT NULL, - features_end integer, - features_start integer, - name character varying(255), - organization_id integer, - remarks character varying(255), - user_id integer, - user_name character varying(255), - writer_type character varying(255) NOT NULL, - input_id bigint NOT NULL, - linked_process bigint, - mail_id bigint NOT NULL, - output_id bigint NOT NULL, - process_status_id bigint NOT NULL, - schedule bigint, - filter character varying(255), - modify_table boolean, - modify_filter character varying(255), - modify_geom boolean -); - - - -CREATE TABLE process_status ( - id bigint NOT NULL, - executing_job_uuid character varying(255), - message text, - process_status_type character varying(255) NOT NULL -); - - -CREATE TABLE qrtz_blob_triggers ( - trigger_name character varying(200) NOT NULL, - trigger_group character varying(200) NOT NULL, - blob_data bytea -); - - - -CREATE TABLE qrtz_calendars ( - calendar_name character varying(200) NOT NULL, - calendar bytea NOT NULL -); - - - -CREATE TABLE qrtz_cron_triggers ( - 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) -); - - -CREATE TABLE qrtz_fired_triggers ( - entry_id character varying(95) NOT NULL, - trigger_name character varying(200) NOT NULL, - trigger_group character varying(200) NOT NULL, - is_volatile boolean NOT NULL, - instance_name character varying(200) NOT NULL, - fired_time bigint NOT NULL, - priority integer NOT NULL, - state character varying(16) NOT NULL, - job_name character varying(200), - job_group character varying(200), - is_stateful boolean, - requests_recovery boolean -); - -CREATE TABLE qrtz_job_details ( - job_name character varying(200) NOT NULL, - job_group character varying(200) NOT NULL, - description character varying(250), - job_class_name character varying(250) NOT NULL, - is_durable boolean NOT NULL, - is_volatile boolean NOT NULL, - is_stateful boolean NOT NULL, - requests_recovery boolean NOT NULL, - job_data bytea -); - - - -CREATE TABLE qrtz_job_listeners ( - job_name character varying(200) NOT NULL, - job_group character varying(200) NOT NULL, - job_listener character varying(200) NOT NULL -); - - -CREATE TABLE qrtz_locks ( - lock_name character varying(40) NOT NULL -); - - -CREATE TABLE qrtz_paused_trigger_grps ( - trigger_group character varying(200) NOT NULL -); - - -CREATE TABLE qrtz_scheduler_state ( - instance_name character varying(200) NOT NULL, - last_checkin_time bigint NOT NULL, - checkin_interval bigint NOT NULL -); - - - -CREATE TABLE qrtz_simple_triggers ( - 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 -); - -CREATE TABLE qrtz_trigger_listeners ( - trigger_name character varying(200) NOT NULL, - trigger_group character varying(200) NOT NULL, - trigger_listener character varying(200) NOT NULL -); - -CREATE TABLE qrtz_triggers ( - 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, - is_volatile boolean NOT NULL, - description character varying(250), - next_fire_time bigint, - prev_fire_time bigint, - priority integer, - trigger_state character varying(16) NOT NULL, - trigger_type character varying(8) NOT NULL, - start_time bigint NOT NULL, - end_time bigint, - calendar_name character varying(200), - misfire_instr smallint, - job_data bytea -); - - -CREATE TABLE schedule ( - id bigint NOT NULL, - cron_expression character varying(120) NOT NULL, - from_date date, - job_name character varying(120) NOT NULL, - schedule_type character varying(255) NOT NULL -); - -CREATE TABLE users ( - id integer NOT NULL, - is_admin boolean NOT NULL, - name character varying(255) NOT NULL, - password character varying(255) NOT NULL -); - - -ALTER TABLE ONLY database_inout - ADD CONSTRAINT database_inout_pkey PRIMARY KEY (id); - - -ALTER TABLE ONLY input_output - ADD CONSTRAINT input_output_pkey PRIMARY KEY (id); - - - -ALTER TABLE ONLY mail - ADD CONSTRAINT mail_pkey PRIMARY KEY (id); - - -ALTER TABLE ONLY organization - ADD CONSTRAINT organization_pkey PRIMARY KEY (id); - - -ALTER TABLE ONLY organization_users - ADD CONSTRAINT organization_users_pkey PRIMARY KEY (users_id); - - -ALTER TABLE ONLY post_action_param - ADD CONSTRAINT post_action_param_pkey PRIMARY KEY (id); - -ALTER TABLE ONLY post_action - ADD CONSTRAINT post_action_pkey PRIMARY KEY (id); - - - -ALTER TABLE ONLY process - ADD CONSTRAINT process_pkey PRIMARY KEY (id); - - -ALTER TABLE ONLY process_status - ADD CONSTRAINT process_status_pkey PRIMARY KEY (id); - - -ALTER TABLE ONLY qrtz_blob_triggers - ADD CONSTRAINT qrtz_blob_triggers_pkey PRIMARY KEY (trigger_name, trigger_group); - - -ALTER TABLE ONLY qrtz_calendars - ADD CONSTRAINT qrtz_calendars_pkey PRIMARY KEY (calendar_name); - - - -ALTER TABLE ONLY qrtz_cron_triggers - ADD CONSTRAINT qrtz_cron_triggers_pkey PRIMARY KEY (trigger_name, trigger_group); - - -ALTER TABLE ONLY qrtz_fired_triggers - ADD CONSTRAINT qrtz_fired_triggers_pkey PRIMARY KEY (entry_id); - - -ALTER TABLE ONLY qrtz_job_details - ADD CONSTRAINT qrtz_job_details_pkey PRIMARY KEY (job_name, job_group); - - -ALTER TABLE ONLY qrtz_job_listeners - ADD CONSTRAINT qrtz_job_listeners_pkey PRIMARY KEY (job_name, job_group, job_listener); - -ALTER TABLE ONLY qrtz_locks - ADD CONSTRAINT qrtz_locks_pkey PRIMARY KEY (lock_name); - - -ALTER TABLE ONLY qrtz_paused_trigger_grps - ADD CONSTRAINT qrtz_paused_trigger_grps_pkey PRIMARY KEY (trigger_group); - - -ALTER TABLE ONLY qrtz_scheduler_state - ADD CONSTRAINT qrtz_scheduler_state_pkey PRIMARY KEY (instance_name); - -ALTER TABLE ONLY qrtz_simple_triggers - ADD CONSTRAINT qrtz_simple_triggers_pkey PRIMARY KEY (trigger_name, trigger_group); - -ALTER TABLE ONLY qrtz_trigger_listeners - ADD CONSTRAINT qrtz_trigger_listeners_pkey PRIMARY KEY (trigger_name, trigger_group, trigger_listener); - - -ALTER TABLE ONLY qrtz_triggers - ADD CONSTRAINT qrtz_triggers_pkey PRIMARY KEY (trigger_name, trigger_group); - - -ALTER TABLE ONLY schedule - ADD CONSTRAINT schedule_pkey PRIMARY KEY (id); - -ALTER TABLE ONLY users - ADD CONSTRAINT users_pkey PRIMARY KEY (id); - -CREATE INDEX idx_qrtz_ft_job_group ON qrtz_fired_triggers USING btree (job_group); - - -CREATE INDEX idx_qrtz_ft_job_name ON qrtz_fired_triggers USING btree (job_name); - - -CREATE INDEX idx_qrtz_ft_job_req_recovery ON qrtz_fired_triggers USING btree (requests_recovery); - - -CREATE INDEX idx_qrtz_ft_job_stateful ON qrtz_fired_triggers USING btree (is_stateful); - - -CREATE INDEX idx_qrtz_ft_trig_group ON qrtz_fired_triggers USING btree (trigger_group); - - -CREATE INDEX idx_qrtz_ft_trig_inst_name ON qrtz_fired_triggers USING btree (instance_name); - - -CREATE INDEX idx_qrtz_ft_trig_name ON qrtz_fired_triggers USING btree (trigger_name); - -CREATE INDEX idx_qrtz_ft_trig_nm_gp ON qrtz_fired_triggers USING btree (trigger_name, trigger_group); - - -CREATE INDEX idx_qrtz_ft_trig_volatile ON qrtz_fired_triggers USING btree (is_volatile); - - -CREATE INDEX idx_qrtz_j_req_recovery ON qrtz_job_details USING btree (requests_recovery); - - -CREATE INDEX idx_qrtz_t_next_fire_time ON qrtz_triggers USING btree (next_fire_time); - - -CREATE INDEX idx_qrtz_t_nft_st ON qrtz_triggers USING btree (next_fire_time, trigger_state); - - -CREATE INDEX idx_qrtz_t_state ON qrtz_triggers USING btree (trigger_state); - - -CREATE INDEX idx_qrtz_t_volatile ON qrtz_triggers USING btree (is_volatile); - - -ALTER TABLE ONLY input_output - ADD CONSTRAINT fk3d134716341b5076 FOREIGN KEY (database_id) REFERENCES database_inout(id); - - -ALTER TABLE ONLY output_organization - ADD CONSTRAINT fk7301a7b11ccf9206 FOREIGN KEY (output_id) REFERENCES input_output(id); - - -ALTER TABLE ONLY output_organization - ADD CONSTRAINT fk7301a7b1a0c96776 FOREIGN KEY (organization_id) REFERENCES organization(id); - -ALTER TABLE ONLY organization_users - ADD CONSTRAINT fkdabfebfc8bf8659e FOREIGN KEY (users_id) REFERENCES users(id); - -ALTER TABLE ONLY organization_users - ADD CONSTRAINT fkdabfebfca0c96776 FOREIGN KEY (organization_id) REFERENCES organization(id); - -ALTER TABLE ONLY process - ADD CONSTRAINT fked8d1e6f1ccf9206 FOREIGN KEY (output_id) REFERENCES input_output(id); - - -ALTER TABLE ONLY process - ADD CONSTRAINT fked8d1e6f3e7ec89c FOREIGN KEY (linked_process) REFERENCES process(id); - - -ALTER TABLE ONLY process - ADD CONSTRAINT fked8d1e6f4594b9ca FOREIGN KEY (schedule) REFERENCES schedule(id); - -ALTER TABLE ONLY process - ADD CONSTRAINT fked8d1e6f5b1356dd FOREIGN KEY (process_status_id) REFERENCES process_status(id); - - -ALTER TABLE ONLY process - ADD CONSTRAINT fked8d1e6f80dcc4f6 FOREIGN KEY (mail_id) REFERENCES mail(id); - -ALTER TABLE ONLY process - ADD CONSTRAINT fked8d1e6fb72ff29d FOREIGN KEY (input_id) REFERENCES input_output(id); - - -ALTER TABLE ONLY qrtz_blob_triggers - ADD CONSTRAINT qrtz_blob_triggers_trigger_name_fkey FOREIGN KEY (trigger_name, trigger_group) REFERENCES qrtz_triggers(trigger_name, trigger_group); - -ALTER TABLE ONLY qrtz_cron_triggers - ADD CONSTRAINT qrtz_cron_triggers_trigger_name_fkey FOREIGN KEY (trigger_name, trigger_group) REFERENCES qrtz_triggers(trigger_name, trigger_group); - -ALTER TABLE ONLY qrtz_job_listeners - ADD CONSTRAINT qrtz_job_listeners_job_name_fkey FOREIGN KEY (job_name, job_group) REFERENCES qrtz_job_details(job_name, job_group); - - -ALTER TABLE ONLY qrtz_simple_triggers - ADD CONSTRAINT qrtz_simple_triggers_trigger_name_fkey FOREIGN KEY (trigger_name, trigger_group) REFERENCES qrtz_triggers(trigger_name, trigger_group); - - -ALTER TABLE ONLY qrtz_trigger_listeners - ADD CONSTRAINT qrtz_trigger_listeners_trigger_name_fkey FOREIGN KEY (trigger_name, trigger_group) REFERENCES qrtz_triggers(trigger_name, trigger_group); - - -ALTER TABLE ONLY qrtz_triggers - ADD CONSTRAINT qrtz_triggers_job_name_fkey FOREIGN KEY (job_name, job_group) REFERENCES qrtz_job_details(job_name, job_group); - --- insert default beheerder // beheerder account, password = beheerder -insert into organization(id, name, upload_path) values (1, 'Beheerders', '/'); -insert into users(id, name, password, is_admin) values (1, 'beheerder', '1ZkPjF0ZNpQOXRr0TImwog%3D%3D', true); -insert into organization_users(organization_id, users_id) values (1, 1); - -INSERT INTO qrtz_locks values('TRIGGER_ACCESS'); -INSERT INTO qrtz_locks values('JOB_ACCESS'); -INSERT INTO qrtz_locks values('CALENDAR_ACCESS'); -INSERT INTO qrtz_locks values('STATE_ACCESS'); -INSERT INTO qrtz_locks values('MISFIRE_ACCESS'); diff --git a/datastorelinkerEntities/database/update wfst/update_wfst_support_oracle.sql b/datastorelinkerEntities/database/update 5.0 to 5.2.1/update_wfst_support_oracle.sql similarity index 100% rename from datastorelinkerEntities/database/update wfst/update_wfst_support_oracle.sql rename to datastorelinkerEntities/database/update 5.0 to 5.2.1/update_wfst_support_oracle.sql diff --git a/datastorelinkerEntities/database/update wfst/update_wfst_support_postgres.sql b/datastorelinkerEntities/database/update 5.0 to 5.2.1/update_wfst_support_postgres.sql similarity index 100% rename from datastorelinkerEntities/database/update wfst/update_wfst_support_postgres.sql rename to datastorelinkerEntities/database/update 5.0 to 5.2.1/update_wfst_support_postgres.sql