BP-831, change oracle scripts
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_Trigger.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_Trigger.sql
deleted file mode 100644
index 25d8ac4..0000000
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_Trigger.sql
+++ /dev/null
@@ -1 +0,0 @@
-CREATE OR REPLACE PROCEDURE create_table_if_doesnt_exist(p_table_name VARCHAR2, create_table_query VARCHAR2) AUTHID CURRENT_USER IS n NUMBER; BEGIN SELECT COUNT(*) INTO n FROM user_tables WHERE table_name = UPPER(p_table_name); IF (n = 0) THEN EXECUTE IMMEDIATE create_table_query; END IF; END;
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist.sql
new file mode 100644
index 0000000..af6e7a2
--- /dev/null
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist.sql
@@ -0,0 +1,271 @@
+-- DROP HISTORY TABLES
+DROP TABLE OPENK.ADDRESS_HIST;
+DROP TABLE OPENK.BRANCH_HIST;
+DROP TABLE OPENK.CALENDAR_HIST;
+DROP TABLE OPENK.CONTACT_DATA_HIST;
+DROP TABLE OPENK.INT_BRANCHES_FOR_GROUP_HIST;
+DROP TABLE OPENK.INT_GROUPS_IN_LIST_HIST;
+DROP TABLE OPENK.INT_LOCATION_HAS_POSTCODE_HIST;
+DROP TABLE OPENK.INT_REGIONS_IN_LOCATION_HIST;
+DROP TABLE OPENK.LOCATION_HIST;
+DROP TABLE OPENK.LOCATION_FOR_BRANCH_HIST;
+DROP TABLE OPENK.ORGANISATION_HIST;
+DROP TABLE OPENK.POSTCODE_HIST;
+DROP TABLE OPENK.REGION_HIST;
+DROP TABLE OPENK.STANDBY_DURATION_HIST;
+DROP TABLE OPENK.STANDBY_GROUP_HIST;
+DROP TABLE OPENK.STANDBY_LIST_HIST;
+DROP TABLE OPENK.STANDBY_PLANNING_STATUS_HIST;
+DROP TABLE OPENK.STANDBY_SCHEDULE_BODY_HIST;
+DROP TABLE OPENK.STANDBY_SCHEDULE_HEADER_HIST;
+DROP TABLE OPENK.STANDBY_SCHEDULE_HISTORY_HIST;
+DROP TABLE OPENK.STANDBY_STATUS_HIST;
+DROP TABLE OPENK.STANDBY_USER_HIST;
+DROP TABLE OPENK.USER_FUNCTION_HIST;
+DROP TABLE OPENK.USER_HAS_USER_FUNCTION_HIST;
+DROP TABLE OPENK.USER_IN_REGION_HIST;
+DROP TABLE OPENK.USER_IN_STANDBY_GROUP_HIST;
+DROP TABLE OPENK.INT_STBY_GROUP_HAS_FUNC_HIST;
+
+--address_hist
+CREATE TABLE OPENK.ADDRESS_HIST AS (SELECT * FROM OPENK.ADDRESS);
+DELETE FROM OPENK.ADDRESS_HIST;
+DROP sequence OPENK.ADDRESS_HIST_SEQ_ID;
+CREATE sequence OPENK.ADDRESS_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.ADDRESS_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.ADDRESS_HIST ADD CONSTRAINT PK_ADDRESS_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.ADDRESS_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.ADDRESS REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.ADDRESS_HIST( id, community, community_suffix, housenumber, latitude, longitude, postcode, street, url_map, wgs_84_zone, operation, stamp) VALUES(:new.id, :new.community, :new.community_suffix, :new.housenumber, :new.latitude, :new.longitude, :new.postcode, :new.street, :new.url_map, :new.wgs_84_zone, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.ADDRESS_HIST(id, community, community_suffix, housenumber, latitude, longitude, postcode, street, url_map, wgs_84_zone, operation, stamp) VALUES(:new.id, :new.community, :new.community_suffix, :new.housenumber, :new.latitude, :new.longitude, :new.postcode, :new.street, :new.url_map, :new.wgs_84_zone, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.ADDRESS_HIST(id, community, community_suffix, housenumber, latitude, longitude, postcode, street, url_map, wgs_84_zone, operation, stamp) VALUES(:old.id, :old.community, :old.community_suffix, :old.housenumber, :old.latitude, :old.longitude, :old.postcode, :old.street, :old.url_map, :old.wgs_84_zone, 'D', SYSDATE); END IF; END;
+
+--branch_hist
+CREATE TABLE OPENK.BRANCH_HIST AS (SELECT * FROM OPENK.BRANCH);
+DELETE FROM OPENK.BRANCH_HIST;
+DROP sequence OPENK.BRANCH_HIST_SEQ_ID;
+CREATE sequence OPENK.BRANCH_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.BRANCH_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.BRANCH_HIST ADD CONSTRAINT PK_BRANCH_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.BRANCH_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.BRANCH REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.BRANCH_HIST( id, title, operation, stamp) VALUES(:new.id, :new.title, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.BRANCH_HIST(id, title, operation, stamp) VALUES(:new.id, :new.title, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.BRANCH_HIST(id, title, operation, stamp) VALUES(:old.id, :old.title, 'D', SYSDATE); END IF; END;
+
+--CALENDAR_hist
+CREATE TABLE OPENK.CALENDAR_HIST AS (SELECT * FROM OPENK.CALENDAR);
+DELETE FROM OPENK.CALENDAR_HIST;
+DROP sequence OPENK.CALENDAR_HIST_SEQ_ID;
+CREATE sequence OPENK.CALENDAR_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.CALENDAR_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.CALENDAR_HIST ADD CONSTRAINT PK_CALENDAR_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.CALENDAR_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.CALENDAR REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.CALENDAR_HIST( id, non_business_date, modification_date, title, repeat, shorttext, valid_from, valid_to, operation, stamp) VALUES(:new.id, :new.non_business_date, :new.modification_date, :new.title, :new.repeat, :new.shorttext, :new.valid_from, :new.valid_to, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.CALENDAR_HIST( id, non_business_date, modification_date, title, repeat, shorttext, valid_from, valid_to, operation, stamp) VALUES(:new.id, :new.non_business_date, :new.modification_date, :new.title, :new.repeat, :new.shorttext, :new.valid_from, :new.valid_to, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.CALENDAR_HIST( id, non_business_date, modification_date, title, repeat, shorttext, valid_from, valid_to, operation, stamp) VALUES(:old.id, :old.non_business_date, :old.modification_date, :old.title, :old.repeat, :old.shorttext, :old.valid_from, :old.valid_to, 'D', SYSDATE); END IF; END;
+
+--CONTACT_DATA_hist
+CREATE TABLE OPENK.CONTACT_DATA_HIST AS (SELECT * FROM OPENK.CONTACT_DATA);
+DELETE FROM OPENK.CONTACT_DATA_HIST;
+DROP sequence OPENK.CONTACT_DATA_HIST_SEQ_ID;
+CREATE sequence OPENK.CONTACT_DATA_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.CONTACT_DATA_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.CONTACT_DATA_HIST ADD CONSTRAINT PK_CONTACT_DATA_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.CONTACT_DATA_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.CONTACT_DATA REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.CONTACT_DATA_HIST( id, cellphone, email, is_private, pager, phone, radiocomm, operation, stamp) VALUES(:new.id, :new.cellphone, :new.email, :new.is_private, :new.pager, :new.phone, :new.radiocomm, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.CONTACT_DATA_HIST( id, cellphone, email, is_private, pager, phone, radiocomm, operation, stamp) VALUES(:new.id, :new.cellphone, :new.email, :new.is_private, :new.pager, :new.phone, :new.radiocomm, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.CONTACT_DATA_HIST( id, cellphone, email, is_private, pager, phone, radiocomm, operation, stamp) VALUES(:old.id, :old.cellphone, :old.email, :old.is_private, :old.pager, :old.phone, :old.radiocomm, 'D', SYSDATE); END IF; END;
+
+--INT_BRANCHES_FOR_GROUP_hist
+CREATE TABLE OPENK.INT_BRANCHES_FOR_GROUP_HIST AS (SELECT * FROM OPENK.INT_BRANCHES_FOR_GROUPS);
+DELETE FROM OPENK.INT_BRANCHES_FOR_GROUP_HIST;
+DROP sequence OPENK.INT_BRAN_FOR_GROUP_HI_SEQ_ID;
+CREATE sequence OPENK.INT_BRAN_FOR_GROUP_HI_SEQ_ID increment by 1;
+ALTER TABLE OPENK.INT_BRANCHES_FOR_GROUP_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.INT_BRANCHES_FOR_GROUP_HIST ADD CONSTRAINT PK_INT_BRANCHES_FOR_GROUP_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.INT_BRANCHES_FOR_GROUP_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.INT_BRANCHES_FOR_GROUPS REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.INT_BRANCHES_FOR_GROUP_HIST( branch_id, standby_group_id, operation, stamp) VALUES(:new.branch_id, :new.standby_group_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.INT_BRANCHES_FOR_GROUP_HIST( branch_id, standby_group_id, operation, stamp) VALUES(:new.branch_id, :new.standby_group_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.INT_BRANCHES_FOR_GROUP_HIST( branch_id, standby_group_id, operation, stamp) VALUES(:old.branch_id, :old.standby_group_id, 'D', SYSDATE); END IF; END;
+
+--INT_GROUPS_IN_LIST_hist
+CREATE TABLE OPENK.INT_GROUPS_IN_LIST_HIST AS (SELECT * FROM OPENK.STANDBY_LIST_HAS_STANDBY_GROUP);
+DELETE FROM OPENK.INT_GROUPS_IN_LIST_HIST;
+DROP sequence OPENK.INT_GROUPS_IN_LIST_HIST_SEQ_ID;
+CREATE sequence OPENK.INT_GROUPS_IN_LIST_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.INT_GROUPS_IN_LIST_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.INT_GROUPS_IN_LIST_HIST ADD CONSTRAINT PK_INT_GROUPS_IN_LIST_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.INT_GROUPS_IN_LIST_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_LIST_HAS_STANDBY_GROUP REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.INT_GROUPS_IN_LIST_HIST( id, position, standby_group_id, standby_list_id, operation, stamp) VALUES(:new.id, :new.position, :new.standby_group_id, :new.standby_list_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.INT_GROUPS_IN_LIST_HIST( id, position, standby_group_id, standby_list_id, operation, stamp) VALUES(:new.id, :new.position, :new.standby_group_id, :new.standby_list_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.INT_GROUPS_IN_LIST_HIST( id, position, standby_group_id, standby_list_id, operation, stamp) VALUES(:old.id, :old.position, :old.standby_group_id, :old.standby_list_id, 'D', SYSDATE); END IF; END;
+
+--INT_LOCATION_HAS_POSTCODE_hist
+CREATE TABLE OPENK.INT_LOCATION_HAS_POSTCODE_HIST AS (SELECT * FROM OPENK.INT_LOCATION_HAS_POSTCODE);
+DELETE FROM OPENK.INT_LOCATION_HAS_POSTCODE_HIST;
+DROP sequence OPENK.INT_LOC_HAS_POSTC_HIST_SEQ_ID;
+CREATE sequence OPENK.INT_LOC_HAS_POSTC_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.INT_LOCATION_HAS_POSTCODE_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.INT_LOCATION_HAS_POSTCODE_HIST ADD CONSTRAINT PK_INT_LOC_HAS_POSTCODE_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.INT_LOC_HAS_POSTCODE_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.INT_LOCATION_HAS_POSTCODE REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.INT_LOCATION_HAS_POSTCODE_HIST( location_id, postcode_id, operation, stamp) VALUES(:new.location_id, :new.postcode_id,'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.INT_LOCATION_HAS_POSTCODE_HIST( location_id, postcode_id, operation, stamp) VALUES(:new.location_id, :new.postcode_id,'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.INT_LOCATION_HAS_POSTCODE_HIST( location_id, postcode_id, operation, stamp) VALUES(:old.location_id, :old.postcode_id,'D', SYSDATE); END IF; END;
+
+--INT_REGIONS_IN_LOCATION_hist
+CREATE TABLE OPENK.INT_REGIONS_IN_LOCATION_HIST AS (SELECT * FROM OPENK.INT_REGIONS_IN_LOCATION);
+DELETE FROM OPENK.INT_REGIONS_IN_LOCATION_HIST;
+DROP sequence OPENK.INT_REGIONS_IN_LOC_HIST_SEQ_ID;
+CREATE sequence OPENK.INT_REGIONS_IN_LO_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.INT_REGIONS_IN_LOCATION_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.INT_REGIONS_IN_LOCATION_HIST ADD CONSTRAINT PK_INT_REGIONS_IN_LOC_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.INT_REGIONS_IN_LOCATION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.INT_REGIONS_IN_LOCATION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.INT_REGIONS_IN_LOCATION_HIST( location_id, region_id, operation, stamp) VALUES(:new.location_id, :new.region_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.INT_REGIONS_IN_LOCATION_HIST( location_id, region_id, operation, stamp) VALUES(:new.location_id, :new.region_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.INT_REGIONS_IN_LOCATION_HIST( location_id, region_id, operation, stamp) VALUES(:old.location_id, :old.region_id, 'D', SYSDATE); END IF; END;
+
+--LOCATION_hist
+CREATE TABLE OPENK.LOCATION_HIST AS (SELECT * FROM OPENK.LOCATION);
+DELETE FROM OPENK.LOCATION_HIST;
+DROP sequence OPENK.LOCATION_HIST_SEQ_ID;
+CREATE sequence OPENK.LOCATION_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.LOCATION_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.LOCATION_HIST ADD CONSTRAINT PK_LOCATION_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.LOCATION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.LOCATION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.LOCATION_HIST( id, community, district, wgs_84_latitude_district, wgs_84_longitude_district, shorttext, title, wgs_84_zone_district, operation, stamp) VALUES(:new.id, :new.community, :new.district, :new.wgs_84_latitude_district, :new.wgs_84_longitude_district, :new.shorttext, :new.title, :new.wgs_84_zone_district, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.LOCATION_HIST( id, community, district, wgs_84_latitude_district, wgs_84_longitude_district, shorttext, title, wgs_84_zone_district, operation, stamp) VALUES(:new.id, :new.community, :new.district, :new.wgs_84_latitude_district, :new.wgs_84_longitude_district, :new.shorttext, :new.title, :new.wgs_84_zone_district, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.LOCATION_HIST( id, community, district, wgs_84_latitude_district, wgs_84_longitude_district, shorttext, title, wgs_84_zone_district, operation, stamp) VALUES(:old.id, :old.community, :old.district, :old.wgs_84_latitude_district, :old.wgs_84_longitude_district, :old.shorttext, :old.title, :old.wgs_84_zone_district, 'D', SYSDATE); END IF; END;
+
+--LOCATION_FOR_BRANCH_hist
+CREATE TABLE OPENK.LOCATION_FOR_BRANCH_HIST AS (SELECT * FROM OPENK.LOCATION_FOR_BRANCH);
+DELETE FROM OPENK.LOCATION_FOR_BRANCH_HIST;
+DROP sequence OPENK.LOC_FOR_BRANCH_HIST_SEQ_ID;
+CREATE sequence OPENK.LOC_FOR_BRANCH_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.LOCATION_FOR_BRANCH_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.LOCATION_FOR_BRANCH_HIST ADD CONSTRAINT PK_LOCATION_FOR_BRANCH_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.LOCATION_FOR_BRANCH_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.LOCATION_FOR_BRANCH REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.LOCATION_FOR_BRANCH_HIST( id, valid_from, valid_to, branch_id, location_id, operation, stamp) VALUES(:new.id, :new.valid_from, :new.valid_to, :new.branch_id, :new.location_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.LOCATION_FOR_BRANCH_HIST( id, valid_from, valid_to, branch_id, location_id, operation, stamp) VALUES(:new.id, :new.valid_from, :new.valid_to, :new.branch_id, :new.location_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.LOCATION_FOR_BRANCH_HIST( id, valid_from, valid_to, branch_id, location_id, operation, stamp) VALUES(:old.id, :old.valid_from, :old.valid_to, :old.branch_id, :old.location_id, 'D', SYSDATE); END IF; END;
+
+--ORGANISATION_hist
+CREATE TABLE OPENK.ORGANISATION_HIST AS (SELECT * FROM OPENK.ORGANISATION);
+DELETE FROM OPENK.ORGANISATION_HIST;
+DROP sequence OPENK.ORGANISATION_HIST_SEQ_ID;
+CREATE sequence OPENK.ORGANISATION_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.ORGANISATION_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.ORGANISATION_HIST ADD CONSTRAINT PK_ORGANISATION_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.ORGANISATION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.ORGANISATION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.ORGANISATION_HIST( id, orga_name, address_id, operation, stamp) VALUES(:new.id, :new.orga_name, :new.address_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.ORGANISATION_HIST( id, orga_name, address_id, operation, stamp) VALUES(:new.id, :new.orga_name, :new.address_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.ORGANISATION_HIST( id, orga_name, address_id, operation, stamp) VALUES(:old.id, :old.orga_name, :old.address_id, 'D', SYSDATE); END IF; END;
+
+--POSTCODE_hist
+CREATE TABLE OPENK.POSTCODE_HIST AS (SELECT * FROM OPENK.POSTCODE);
+DELETE FROM OPENK.POSTCODE_HIST;
+DROP sequence OPENK.POSTCODE_HIST_SEQ_ID;
+CREATE sequence OPENK.POSTCODE_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.POSTCODE_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.POSTCODE_HIST ADD CONSTRAINT PK_POSTCODE_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.POSTCODE_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.POSTCODE REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.POSTCODE_HIST( id, postcode, operation, stamp) VALUES(:new.id, :new.postcode, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.POSTCODE_HIST( id, postcode, operation, stamp) VALUES(:new.id, :new.postcode, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.POSTCODE_HIST( id, postcode, operation, stamp) VALUES(:old.id, :old.postcode, 'D', SYSDATE); END IF; END;
+
+--REGION_hist
+CREATE TABLE OPENK.REGION_HIST AS (SELECT * FROM OPENK.REGION);
+DELETE FROM OPENK.REGION_HIST;
+DROP sequence OPENK.REGION_HIST_SEQ_ID;
+CREATE sequence OPENK.REGION_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.REGION_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.REGION_HIST ADD CONSTRAINT PK_REGION_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.REGION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.REGION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.REGION_HIST( id, region_name, operation, stamp) VALUES(:new.id, :new.region_name, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.REGION_HIST( id, region_name, operation, stamp) VALUES(:new.id, :new.region_name, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.REGION_HIST( id, region_name, operation, stamp) VALUES(:old.id, :old.region_name, 'D', SYSDATE); END IF; END;
+
+--STANDBY_DURATION_hist
+CREATE TABLE OPENK.STANDBY_DURATION_HIST AS (SELECT * FROM OPENK.STANDBY_DURATION);
+DELETE FROM OPENK.STANDBY_DURATION_HIST;
+DROP sequence OPENK.STANDBY_DURATION_HIST_SEQ_ID;
+CREATE sequence OPENK.STANDBY_DURATION_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_DURATION_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_DURATION_HIST ADD CONSTRAINT PK_STANDBY_DURATION_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_DURATION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_DURATION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_DURATION_HIST( id, modification_date, next_user_in_next_duration, valid_day_from, valid_day_to, valid_from, valid_to, standby_group_id, operation, stamp) VALUES(:new.id, :new.modification_date, :new.next_user_in_next_duration, :new.valid_day_from, :new.valid_day_to, :new.valid_from, :new.valid_to, :new.standby_group_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_DURATION_HIST( id, modification_date, next_user_in_next_duration, valid_day_from, valid_day_to, valid_from, valid_to, standby_group_id, operation, stamp) VALUES(:new.id, :new.modification_date, :new.next_user_in_next_duration, :new.valid_day_from, :new.valid_day_to, :new.valid_from, :new.valid_to, :new.standby_group_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_DURATION_HIST( id, modification_date, next_user_in_next_duration, valid_day_from, valid_day_to, valid_from, valid_to, standby_group_id, operation, stamp) VALUES(:old.id, :old.modification_date, :old.next_user_in_next_duration, :old.valid_day_from, :old.valid_day_to, :old.valid_from, :old.valid_to, :old.standby_group_id, 'D', SYSDATE); END IF; END;
+
+--STANDBY_GROUP_hist
+CREATE TABLE OPENK.STANDBY_GROUP_HIST AS (SELECT * FROM OPENK.STANDBY_GROUP);
+DELETE FROM OPENK.STANDBY_GROUP_HIST;
+DROP sequence OPENK.STANDBY_GROUP_HIST_SEQ_ID;
+CREATE sequence OPENK.STANDBY_GROUP_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_GROUP_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_GROUP_HIST ADD CONSTRAINT PK_STANDBY_GROUP_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_GROUP_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_GROUP REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_GROUP_HIST( id, extend_standby_time, modification_date, next_user_in_next_cycle, note, title, operation, stamp) VALUES(:new.id, :new.extend_standby_time, :new.modification_date, :new.next_user_in_next_cycle, :new.note, :new.title, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_GROUP_HIST( id, extend_standby_time, modification_date, next_user_in_next_cycle, note, title, operation, stamp) VALUES(:new.id, :new.extend_standby_time, :new.modification_date, :new.next_user_in_next_cycle, :new.note, :new.title, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_GROUP_HIST( id, extend_standby_time, modification_date, next_user_in_next_cycle, note, title, operation, stamp) VALUES(:old.id, :old.extend_standby_time, :old.modification_date, :old.next_user_in_next_cycle, :old.note, :old.title, 'D', SYSDATE); END IF; END;
+
+--STANDBY_LIST_hist
+CREATE TABLE OPENK.STANDBY_LIST_HIST AS (SELECT * FROM OPENK.STANDBY_LIST);
+DELETE FROM OPENK.STANDBY_LIST_HIST;
+DROP sequence OPENK.STANDBY_LIST_HIST_SEQ_ID;
+CREATE sequence OPENK.STANDBY_LIST_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_LIST_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_LIST_HIST ADD CONSTRAINT PK_STANDBY_LIST_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_LIST_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_LIST REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_LIST_HIST( id, modification_date, title, operation, stamp) VALUES(:new.id, :new.modification_date, :new.title, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_LIST_HIST( id, modification_date, title, operation, stamp) VALUES(:new.id, :new.modification_date, :new.title, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_LIST_HIST( id, modification_date, title, operation, stamp) VALUES(:old.id, :old.modification_date, :old.title, 'D', SYSDATE); END IF; END;
+
+--STANDBY_PLANNING_STATUS_hist
+CREATE TABLE OPENK.STANDBY_PLANNING_STATUS_HIST AS (SELECT * FROM OPENK.STANDBY_PLANNING_STATUS);
+DELETE FROM OPENK.STANDBY_PLANNING_STATUS_HIST;
+DROP sequence OPENK.STBY_PLAN_STATUS_HIST_SEQ_ID;
+CREATE sequence OPENK.STBY_PLAN_STATUS_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_PLANNING_STATUS_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_PLANNING_STATUS_HIST ADD CONSTRAINT PK_STBY_PLAN_STATUS_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_PLANNING_STATUS_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_PLANNING_STATUS REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_PLANNING_STATUS_HIST( id, title, operation, stamp) VALUES(:new.id,:new.title, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_PLANNING_STATUS_HIST( id, title, operation, stamp) VALUES(:new.id, :new.title, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_PLANNING_STATUS_HIST( id, title, operation, stamp) VALUES(:old.id, :old.title, 'D', SYSDATE); END IF; END;
+
+--STANDBY_SCHEDULE_BODY_hist
+CREATE TABLE OPENK.STANDBY_SCHEDULE_BODY_HIST AS (SELECT * FROM OPENK.STANDBY_SCHEDULE_BODY);
+DELETE FROM OPENK.STANDBY_SCHEDULE_BODY_HIST;
+DROP sequence OPENK.STBY_SCHEDULE_BODY_HIST_SEQ_ID;
+CREATE sequence OPENK.STBY_SCHEDULE_BODY_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_SCHEDULE_BODY_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_SCHEDULE_BODY_HIST ADD CONSTRAINT PK_STANDBY_SCHEDULE_BODY_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_SCHEDULE_BODY_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_SCHEDULE_BODY REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_BODY_HIST( id, modification_date, modification_by, modification_cause, valid_from, valid_to, standby_group_id, status_id, user_id, operation, stamp) VALUES(:new.id, :new.modification_date, :new.modification_by, :new.modification_cause, :new.valid_from, :new.valid_to, :new.standby_group_id, :new.status_id, :new.user_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_BODY_HIST(id, modification_date, modification_by, modification_cause, valid_from, valid_to, standby_group_id, status_id, user_id, operation, stamp) VALUES(:new.id, :new.modification_date, :new.modification_by, :new.modification_cause, :new.valid_from, :new.valid_to, :new.standby_group_id, :new.status_id, :new.user_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_BODY_HIST(id, modification_date, modification_by, modification_cause, valid_from, valid_to, standby_group_id, status_id, user_id, operation, stamp) VALUES(:old.id, :old.modification_date, :old.modification_by, :old.modification_cause, :old.valid_from, :old.valid_to, :old.standby_group_id, :old.status_id, :old.user_id, 'D', SYSDATE); END IF; END;
+
+--STANDBY_SCHEDULE_HEADER_hist
+CREATE TABLE OPENK.STANDBY_SCHEDULE_HEADER_HIST AS (SELECT * FROM OPENK.STANDBY_SCHEDULE_HEADER);
+DELETE FROM OPENK.STANDBY_SCHEDULE_HEADER_HIST;
+DROP sequence OPENK.STBY_SCHEDULE_HDR_HIST_SEQ_ID;
+CREATE sequence OPENK.STBY_SCHEDULE_HDR_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_SCHEDULE_HEADER_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_SCHEDULE_HEADER_HIST ADD CONSTRAINT PK_STBY_SCHEDULE_HEADER_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_SCHEDULE_HEADER_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_SCHEDULE_HEADER REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_HEADER_HIST( id, modification_date, title, valid_from, valid_to, status_id, operation, stamp) VALUES(:new.id, :new.modification_date, :new.title, :new.valid_from, :new.valid_to, :new.status_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_HEADER_HIST( id, modification_date, title, valid_from, valid_to, status_id, operation, stamp) VALUES(:new.id, :new.modification_date, :new.title, :new.valid_from, :new.valid_to, :new.status_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_HEADER_HIST( id, modification_date, title, valid_from, valid_to, status_id, operation, stamp) VALUES(:old.id, :old.modification_date, :old.title, :old.valid_from, :old.valid_to, :old.status_id, 'D', SYSDATE); END IF; END;
+
+--STANDBY_SCHEDULE_HISTORY_hist
+CREATE TABLE OPENK.STANDBY_SCHEDULE_HISTORY_HIST AS (SELECT * FROM OPENK.STANDBY_SCHEDULE_HISTORY);
+DELETE FROM OPENK.STANDBY_SCHEDULE_HISTORY_HIST;
+DROP sequence OPENK.STBY_SCHEDULE_HI_HIST_SEQ_ID;
+CREATE sequence OPENK.STBY_SCHEDULE_HI_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_SCHEDULE_HISTORY_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_SCHEDULE_HISTORY_HIST ADD CONSTRAINT PK_STBY_SCHEDULE_HI_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_SCHEDULE_HISTORY_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_SCHEDULE_HISTORY REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_HISTORY_HIST( id, changed_by, file_data, file_hash_value, modification_date, schedule_header, operation, stamp) VALUES(:new.id, :new.changed_by, :new.file_data, :new.file_hash_value, :new.modification_date, :new.schedule_header, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_HISTORY_HIST( id, changed_by, file_data, file_hash_value, modification_date, schedule_header, operation, stamp) VALUES(:new.id, :new.changed_by, :new.file_data, :new.file_hash_value, :new.modification_date, :new.schedule_header, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_SCHEDULE_HISTORY_HIST( id, changed_by, file_data, file_hash_value, modification_date, schedule_header, operation, stamp) VALUES(:old.id, :old.changed_by, :old.file_data, :old.file_hash_value, :old.modification_date, :old.schedule_header, 'D', SYSDATE); END IF; END;
+
+--STANDBY_STATUS_hist
+CREATE TABLE OPENK.STANDBY_STATUS_HIST AS (SELECT * FROM OPENK.STANDBY_STATUS);
+DELETE FROM OPENK.STANDBY_STATUS_HIST;
+DROP sequence OPENK.STANDBY_STATUS_HIST_SEQ_ID;
+CREATE sequence OPENK.STANDBY_STATUS_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_STATUS_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_STATUS_HIST ADD CONSTRAINT PK_STANDBY_STATUS_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_STATUS_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_STATUS REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_STATUS_HIST( id, title, operation, stamp) VALUES(:new.id, :new.title, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_STATUS_HIST(id, title, operation, stamp) VALUES(:new.id, :new.title, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_STATUS_HIST(id, title, operation, stamp) VALUES(:old.id, :old.title, 'D', SYSDATE); END IF; END;
+
+--STANDBY_USER_hist
+CREATE TABLE OPENK.STANDBY_USER_HIST AS (SELECT * FROM OPENK.STANDBY_USER);
+DELETE FROM OPENK.STANDBY_USER_HIST;
+DROP sequence OPENK.STANDBY_USER_HIST_SEQ_ID;
+CREATE sequence OPENK.STANDBY_USER_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.STANDBY_USER_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.STANDBY_USER_HIST ADD CONSTRAINT PK_STANDBY_USER_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.STANDBY_USER_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.STANDBY_USER REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.STANDBY_USER_HIST( id, firstname, hr_number, is_company, lastname, modification_date, notes, user_key, valid_from, valid_to, business_contact_id, organisation_id, private_address_id, private_contact_id, operation, stamp) VALUES(:new.id, :new.firstname, :new.hr_number, :new.is_company, :new.lastname, :new.modification_date, :new.notes, :new.user_key, :new.valid_from, :new.valid_to, :new.business_contact_id, :new.organisation_id, :new.private_address_id, :new.private_contact_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.STANDBY_USER_HIST( id, firstname, hr_number, is_company, lastname, modification_date, notes, user_key, valid_from, valid_to, business_contact_id, organisation_id, private_address_id, private_contact_id, operation, stamp) VALUES(:new.id, :new.firstname, :new.hr_number, :new.is_company, :new.lastname, :new.modification_date, :new.notes, :new.user_key, :new.valid_from, :new.valid_to, :new.business_contact_id, :new.organisation_id, :new.private_address_id, :new.private_contact_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.STANDBY_USER_HIST( id, firstname, hr_number, is_company, lastname, modification_date, notes, user_key, valid_from, valid_to, business_contact_id, organisation_id, private_address_id, private_contact_id, operation, stamp) VALUES(:old.id, :old.firstname, :old.hr_number, :old.is_company, :old.lastname, :old.modification_date, :old.notes, :old.user_key, :old.valid_from, :old.valid_to, :old.business_contact_id, :old.organisation_id, :old.private_address_id, :old.private_contact_id, 'D', SYSDATE); END IF; END;
+
+--USER_FUNCTION_hist
+CREATE TABLE OPENK.USER_FUNCTION_HIST AS (SELECT * FROM OPENK.USER_FUNCTION);
+DELETE FROM OPENK.USER_FUNCTION_HIST;
+DROP sequence OPENK.USER_FUNCTION_HIST_SEQ_ID;
+CREATE sequence OPENK.USER_FUNCTION_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.USER_FUNCTION_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.USER_FUNCTION_HIST ADD CONSTRAINT PK_USER_FUNCTION_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.USER_FUNCTION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.USER_FUNCTION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.USER_FUNCTION_HIST( id, function_name, operation, stamp) VALUES (:new.id, :new.function_name, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.USER_FUNCTION_HIST( id, function_name, operation, stamp) VALUES(:new.id, :new.function_name, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.USER_FUNCTION_HIST(id, function_name, operation, stamp) VALUES(:old.id, :old.function_name, 'D', SYSDATE); END IF; END;
+
+--USER_HAS_USER_HAS_USER_FUNCTION_hist
+CREATE TABLE OPENK.USER_HAS_USER_FUNCTION_HIST AS (SELECT * FROM OPENK.USER_HAS_USER_FUNCTION);
+DELETE FROM OPENK.USER_HAS_USER_FUNCTION_HIST;
+DROP sequence OPENK.USER_HAS_USER_FUNC_HIST_SEQ_ID;
+CREATE sequence OPENK.USER_HAS_USER_FUNC_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.USER_HAS_USER_FUNCTION_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.USER_HAS_USER_FUNCTION_HIST ADD CONSTRAINT PK_USER_HAS_USER_FUNCTION_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.USER_HAS_USER_FUNCTION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.USER_HAS_USER_FUNCTION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.USER_HAS_USER_FUNCTION_HIST( id, user_id, user_function_id, operation, stamp) VALUES (:new.id, :new.user_id, :new.user_function_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.USER_HAS_USER_FUNCTION_HIST( id, user_id, user_function_id, operation, stamp) VALUES(:new.id, :new.user_id, :new.user_function_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.USER_HAS_USER_FUNCTION_HIST(id, user_id, user_function_id, operation, stamp) VALUES(:old.id, :old.user_id, :old.user_function_id, 'D', SYSDATE); END IF; END;
+
+--USER_IN_REGION_hist
+CREATE TABLE OPENK.USER_IN_REGION_HIST AS (SELECT * FROM OPENK.USER_IN_REGION);
+DELETE FROM OPENK.USER_IN_REGION_HIST;
+DROP sequence OPENK.USER_IN_REGION_HIST_SEQ_ID;
+CREATE sequence OPENK.USER_IN_REGION_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.USER_IN_REGION_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.USER_IN_REGION_HIST ADD CONSTRAINT PK_USER_IN_REGION_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.USER_IN_REGION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.USER_IN_REGION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.USER_IN_REGION_HIST( id, region_id, user_id, operation, stamp) VALUES(:new.id, :new.region_id, :new.user_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.USER_IN_REGION_HIST( id, region_id, user_id, operation, stamp) VALUES(:new.id, :new.region_id, :new.user_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.USER_IN_REGION_HIST( id, region_id, user_id, operation, stamp) VALUES(:old.id, :old.region_id, :old.user_id, 'D', SYSDATE); END IF; END;
+
+--USER_IN_STANDBY_GROUP_hist
+CREATE TABLE OPENK.USER_IN_STANDBY_GROUP_HIST AS (SELECT * FROM OPENK.USER_IN_STANDBY_GROUP);
+DELETE FROM OPENK.USER_IN_STANDBY_GROUP_HIST;
+DROP sequence OPENK.USER_IN_STBY_GROUP_HIST_SEQ_ID;
+CREATE sequence OPENK.USER_IN_STBY_GROUP_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.USER_IN_STANDBY_GROUP_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.USER_IN_STANDBY_GROUP_HIST ADD CONSTRAINT PK_USER_IN_STANDBY_GROUP_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.USER_IN_STANDBY_GROUP_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.USER_IN_STANDBY_GROUP REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.USER_IN_STANDBY_GROUP_HIST( id, position, valid_from, valid_to, standby_group_id, user_id, operation, stamp) VALUES(:new.id, :new.position, :new.valid_from, :new.valid_to, :new.standby_group_id, :new.user_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.USER_IN_STANDBY_GROUP_HIST( id, position, valid_from, valid_to, standby_group_id, user_id, operation, stamp) VALUES(:new.id, :new.position, :new.valid_from, :new.valid_to, :new.standby_group_id, :new.user_id, 'U', SYSDATE); ELSIF (DELETING) THEN INSERT INTO OPENK.USER_IN_STANDBY_GROUP_HIST( id, position, valid_from, valid_to, standby_group_id, user_id, operation, stamp) VALUES(:old.id, :old.position, :old.valid_from, :old.valid_to, :old.standby_group_id, :old.user_id, 'D', SYSDATE); END IF; END;
+
+--INT_STANDBY_GROUP_HAS_FUNCTION_hist
+CREATE TABLE OPENK.INT_STBY_GROUP_HAS_FUNC_HIST AS (SELECT * FROM OPENK.INT_STANDBYGROUP_HAS_FUNCTION);
+DELETE FROM OPENK.INT_STBY_GROUP_HAS_FUNC_HIST;
+DROP sequence OPENK.INT_GROUP_HAS_FUNC_HIST_SEQ_ID;
+CREATE sequence OPENK.INT_GROUP_HAS_FUNC_HIST_SEQ_ID increment by 1;
+ALTER TABLE OPENK.INT_STBY_GROUP_HAS_FUNC_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
+ALTER TABLE OPENK.INT_STBY_GROUP_HAS_FUNC_HIST ADD CONSTRAINT PK_INT_GROUP_HAS_FUNCTION_HIST PRIMARY KEY (HIST_ID);
+CREATE OR REPLACE TRIGGER OPENK.INT_GROUP_HAS_FUNCTION_AUDIT BEFORE INSERT OR DELETE OR UPDATE ON OPENK.INT_STANDBYGROUP_HAS_FUNCTION REFERENCING OLD AS old NEW AS new FOR EACH ROW BEGIN IF (INSERTING) THEN INSERT INTO OPENK.INT_STBY_GROUP_HAS_FUNC_HIST( group_id, user_function_id, operation, stamp) VALUES(:new.group_id, :new.user_function_id, 'I', SYSDATE); ELSIF (UPDATING) THEN INSERT INTO OPENK.INT_STBY_GROUP_HAS_FUNC_HIST( group_id, user_function_id, operation, stamp) VALUES(:old.group_id, :old.user_function_id, 'D', SYSDATE); END IF; END;
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_address.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_address.sql
index d23f5b3..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_address.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_address.sql
@@ -1,10 +1 @@
-/*Address History*/
-call create_table_if_doesnt_exist('OPENK.ADDRESS_HIST', 'CREATE TABLE OPENK.ADDRESS_HIST AS (SELECT * FROM OPENK.ADDRESS)');
-DELETE FROM OPENK.ADDRESS_HIST;
-DROP sequence OPENK.ADDRESS_HIST_SEQ_ID;
-CREATE sequence OPENK.ADDRESS_HIST_SEQ_ID increment by 1;
-ALTER TABLE OPENK.ADDRESS_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
-ALTER TABLE OPENK.ADDRESS_HIST ADD CONSTRAINT PK_ADDRESS_HIST PRIMARY KEY (HIST_ID);
-CREATE OR REPLACE FUNCTION process_address_audit() RETURNS TRIGGER AS $object_audit$ BEGIN IF (TG_OP = 'DELETE') THEN INSERT INTO {0}.address_hist SELECT nextval('address_hist_hist_id_seq'), 'D', now(), OLD.*; ELSIF (TG_OP = 'UPDATE') THEN INSERT INTO {0}.address_hist SELECT nextval('address_hist_hist_id_seq'), 'U', now(), NEW.*; ELSIF (TG_OP = 'INSERT') THEN INSERT INTO {0}.address_hist SELECT nextval('address_hist_hist_id_seq'), 'I', now(), NEW.*; END IF; RETURN NULL; END; $object_audit$ LANGUAGE plpgsql;
-DROP TRIGGER IF EXISTS address_audit on {0}.address;
-CREATE TRIGGER address_audit AFTER INSERT OR UPDATE OR DELETE ON {0}.address FOR EACH ROW EXECUTE PROCEDURE process_address_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_branch.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_branch.sql
index 9bcd097..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_branch.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_branch.sql
@@ -1,10 +1 @@
-/*Branch History*/
-call create_table_if_doesnt_exist('OPENK.BRACNH_HIST', 'CREATE TABLE OPENK.BRANCH_HIST AS (SELECT * FROM OPENK.BRACNH)');
-DELETE FROM OPENK.BRANCH_HIST;
-DROP sequence OPENK.BRACNH_HIST_SEQ_ID;
-CREATE sequence OPENK.BRANCH_HIST_SEQ_ID increment by 1;
-ALTER TABLE OPENK.BRANCH_HIST ADD(HIST_ID number(19,0) GENERATED BY DEFAULT ON NULL AS IDENTITY, operation char(1), stamp timestamp);
-ALTER TABLE OPENK.BRANCH_HIST ADD CONSTRAINT PK_BRANCH_HIST PRIMARY KEY (HIST_ID);
-CREATE OR REPLACE FUNCTION process_branch_audit() RETURNS TRIGGER AS $object_audit$ BEGIN IF (TG_OP = 'DELETE') THEN INSERT INTO {0}.branch_hist SELECT nextval('branch_hist_hist_id_seq'), 'D', now(), OLD.*; ELSIF (TG_OP = 'UPDATE') THEN INSERT INTO {0}.branch_hist SELECT nextval('branch_hist_hist_id_seq'), 'U', now(), NEW.*; ELSIF (TG_OP = 'INSERT') THEN INSERT INTO {0}.branch_hist SELECT nextval('branch_hist_hist_id_seq'), 'I', now(), NEW.*; END IF; RETURN NULL; END; $object_audit$ LANGUAGE plpgsql;
-DROP TRIGGER IF EXISTS branch_audit on {0}.branch;
-CREATE TRIGGER branch_audit AFTER INSERT OR UPDATE OR DELETE ON {0}.branch FOR EACH ROW EXECUTE PROCEDURE process_branch_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_calendar.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_calendar.sql
index d852547..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_calendar.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_calendar.sql
@@ -1,24 +1 @@
-/*Calendar History*/
-CREATE TABLE IF NOT EXISTS CALENDAR_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE CALENDAR EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_calendar_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.calendar_hist_audit to reflect the operation performed on calendar,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.calendar_hist SELECT nextval('calendar_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.calendar_hist SELECT nextval('calendar_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.calendar_hist SELECT nextval('calendar_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS calendar_audit on public.calendar;
-CREATE TRIGGER calendar_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.calendar
- FOR EACH ROW EXECUTE PROCEDURE process_calendar_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_contact_data.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_contact_data.sql
index c18a9a9..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_contact_data.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_contact_data.sql
@@ -1,24 +1 @@
-/*ContactData History*/
-CREATE TABLE IF NOT EXISTS CONTACT_DATA_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE CONTACT_DATA EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_contact_data_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.contact_data_hist_audit to reflect the operation performed on contact_data,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.contact_data_hist SELECT nextval('contact_data_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.contact_data_hist SELECT nextval('contact_data_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.contact_data_hist SELECT nextval('contact_data_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS contact_data_audit on public.contact_data;
-CREATE TRIGGER contact_data_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.contact_data
- FOR EACH ROW EXECUTE PROCEDURE process_contact_data_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_branches_for_groups.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_branches_for_groups.sql
index 7b04ed7..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_branches_for_groups.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_branches_for_groups.sql
@@ -1,24 +1 @@
-/*Int_branches_for_groups History*/
-CREATE TABLE IF NOT EXISTS INT_BRANCHES_FOR_GROUPS_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE INT_BRANCHES_FOR_GROUPS EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_int_branches_for_groups_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.int_branches_for_groups_hist_audit to reflect the operation performed on int_branches_for_groups,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.int_branches_for_groups_hist SELECT nextval('int_branches_for_groups_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.int_branches_for_groups_hist SELECT nextval('int_branches_for_groups_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.int_branches_for_groups_hist SELECT nextval('int_branches_for_groups_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS int_branches_for_groups_audit on public.int_branches_for_groups;
-CREATE TRIGGER int_branches_for_groups_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.int_branches_for_groups
- FOR EACH ROW EXECUTE PROCEDURE process_int_branches_for_groups_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_groups_in_list.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_groups_in_list.sql
index b54845e..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_groups_in_list.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_groups_in_list.sql
@@ -1,24 +1 @@
-/*Int_groups_in_list History*/
-CREATE TABLE IF NOT EXISTS INT_GROUPS_IN_LIST_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE INT_GROUPS_IN_LIST EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_int_groups_in_list_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.int_groups_in_list_hist_audit to reflect the operation performed on int_groups_in_list,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.int_groups_in_list_hist SELECT nextval('int_groups_in_list_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.int_groups_in_list_hist SELECT nextval('int_groups_in_list_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.int_groups_in_list_hist SELECT nextval('int_groups_in_list_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS int_groups_in_list_audit on public.int_groups_in_list;
-CREATE TRIGGER int_groups_in_list_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.int_groups_in_list
- FOR EACH ROW EXECUTE PROCEDURE process_int_groups_in_list_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_location_has_postcode.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_location_has_postcode.sql
index 4feec03..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_location_has_postcode.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_location_has_postcode.sql
@@ -1,24 +1 @@
-/*Int_location_has_postcode History*/
-CREATE TABLE IF NOT EXISTS INT_LOCATION_HAS_POSTCODE_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE INT_LOCATION_HAS_POSTCODE EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_int_location_has_postcode_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.int_location_has_postcode_hist_audit to reflect the operation performed on int_location_has_postcode,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.int_location_has_postcode_hist SELECT nextval('int_location_has_postcode_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.int_location_has_postcode_hist SELECT nextval('int_location_has_postcode_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.int_location_has_postcode_hist SELECT nextval('int_location_has_postcode_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS int_location_has_postcode_audit on public.int_location_has_postcode;
-CREATE TRIGGER int_location_has_postcode_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.int_location_has_postcode
- FOR EACH ROW EXECUTE PROCEDURE process_int_location_has_postcode_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_regions_in_location.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_regions_in_location.sql
index 1d68197..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_regions_in_location.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_regions_in_location.sql
@@ -1,24 +1 @@
-/*Int_regions_in_location History*/
-CREATE TABLE IF NOT EXISTS INT_REGIONS_IN_LOCATION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE INT_REGIONS_IN_LOCATION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_int_regions_in_location_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.int_regions_in_location_hist_audit to reflect the operation performed on int_regions_in_location,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.int_regions_in_location_hist SELECT nextval('int_regions_in_location_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.int_regions_in_location_hist SELECT nextval('int_regions_in_location_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.int_regions_in_location_hist SELECT nextval('int_regions_in_location_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS int_regions_in_location_audit on public.int_regions_in_location;
-CREATE TRIGGER int_regions_in_location_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.int_regions_in_location
- FOR EACH ROW EXECUTE PROCEDURE process_int_regions_in_location_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_standbygroup_has_function.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_standbygroup_has_function.sql
index 6751144..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_standbygroup_has_function.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_int_standbygroup_has_function.sql
@@ -1,24 +1 @@
-/*int_standbygroup_has_function History*/
-CREATE TABLE IF NOT EXISTS INT_STANDBYGROUP_HAS_FUNCTION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE INT_STANDBYGROUP_HAS_FUNCTION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_int_standbygroup_has_function_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.int_standbygroup_has_function_hist_audit to reflect the operation performed on int_standbygroup_has_function,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.int_standbygroup_has_function_hist SELECT nextval('int_standbygroup_has_function_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.int_standbygroup_has_function_hist SELECT nextval('int_standbygroup_has_function_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.int_standbygroup_has_function_hist SELECT nextval('int_standbygroup_has_function_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS int_standbygroup_has_function_audit on public.int_standbygroup_has_function;
-CREATE TRIGGER int_standbygroup_has_function_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.int_standbygroup_has_function
- FOR EACH ROW EXECUTE PROCEDURE process_int_standbygroup_has_function_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_location.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_location.sql
index c54fee2..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_location.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_location.sql
@@ -1,24 +1 @@
-/*Location History*/
-CREATE TABLE IF NOT EXISTS LOCATION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE LOCATION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_location_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.location_hist_audit to reflect the operation performed on location,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.location_hist SELECT nextval('location_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.location_hist SELECT nextval('location_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.location_hist SELECT nextval('location_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS location_audit on public.location;
-CREATE TRIGGER location_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.location
- FOR EACH ROW EXECUTE PROCEDURE process_location_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_location_for_branch.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_location_for_branch.sql
index 5a2d5d1..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_location_for_branch.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_location_for_branch.sql
@@ -1,24 +1 @@
-/*Location_for_branch History*/
-CREATE TABLE IF NOT EXISTS LOCATION_FOR_BRANCH_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE LOCATION_FOR_BRANCH EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_location_for_branch_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.location_for_branch_hist_audit to reflect the operation performed on location_for_branch,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.location_for_branch_hist SELECT nextval('location_for_branch_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.location_for_branch_hist SELECT nextval('location_for_branch_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.location_for_branch_hist SELECT nextval('location_for_branch_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS location_for_branch_audit on public.location_for_branch;
-CREATE TRIGGER location_for_branch_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.location_for_branch
- FOR EACH ROW EXECUTE PROCEDURE process_location_for_branch_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_organisation.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_organisation.sql
index 8d94ee4..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_organisation.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_organisation.sql
@@ -1,24 +1 @@
-/*Organisation History*/
-CREATE TABLE IF NOT EXISTS ORGANISATION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE ORGANISATION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_organisation_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.organisation_hist_audit to reflect the operation performed on organisation,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.organisation_hist SELECT nextval('organisation_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.organisation_hist SELECT nextval('organisation_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.organisation_hist SELECT nextval('organisation_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS organisation_audit on public.organisation;
-CREATE TRIGGER organisation_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.organisation
- FOR EACH ROW EXECUTE PROCEDURE process_organisation_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_postcode.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_postcode.sql
index d8385a9..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_postcode.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_postcode.sql
@@ -1,24 +1 @@
-/*Postcode History*/
-CREATE TABLE IF NOT EXISTS POSTCODE_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE POSTCODE EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_postcode_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.postcode_hist_audit to reflect the operation performed on postcode,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.postcode_hist SELECT nextval('postcode_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.postcode_hist SELECT nextval('postcode_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.postcode_hist SELECT nextval('postcode_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS postcode_audit on public.postcode;
-CREATE TRIGGER postcode_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.postcode
- FOR EACH ROW EXECUTE PROCEDURE process_postcode_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_region.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_region.sql
index c9752d5..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_region.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_region.sql
@@ -1,24 +1 @@
-/*Region History*/
-CREATE TABLE IF NOT EXISTS REGION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE REGION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_region_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.region_hist_audit to reflect the operation performed on region,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.region_hist SELECT nextval('region_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.region_hist SELECT nextval('region_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.region_hist SELECT nextval('region_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS region_audit on public.region;
-CREATE TRIGGER region_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.region
- FOR EACH ROW EXECUTE PROCEDURE process_region_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_duration.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_duration.sql
index cb57a30..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_duration.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_duration.sql
@@ -1,24 +1 @@
-/*Standby_duration History*/
-CREATE TABLE IF NOT EXISTS STANDBY_DURATION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE STANDBY_DURATION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_standby_duration_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.standby_duration_hist_audit to reflect the operation performed on standby_duration,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.standby_duration_hist SELECT nextval('standby_duration_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.standby_duration_hist SELECT nextval('standby_duration_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.standby_duration_hist SELECT nextval('standby_duration_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS standby_duration_audit on public.standby_duration;
-CREATE TRIGGER standby_duration_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.standby_duration
- FOR EACH ROW EXECUTE PROCEDURE process_standby_duration_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_group.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_group.sql
index 1bb8ac0..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_group.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_group.sql
@@ -1,24 +1 @@
-/*Standby_group History*/
-CREATE TABLE IF NOT EXISTS STANDBY_GROUP_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE STANDBY_GROUP EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_standby_group_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.standby_group_hist_audit to reflect the operation performed on standby_group,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.standby_group_hist SELECT nextval('standby_group_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.standby_group_hist SELECT nextval('standby_group_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.standby_group_hist SELECT nextval('standby_group_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS standby_group_audit on public.standby_group;
-CREATE TRIGGER standby_group_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.standby_group
- FOR EACH ROW EXECUTE PROCEDURE process_standby_group_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_list.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_list.sql
index 257983e..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_list.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_list.sql
@@ -1,24 +1 @@
-/*Standby_list History*/
-CREATE TABLE IF NOT EXISTS STANDBY_LIST_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE STANDBY_LIST EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_standby_list_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.standby_list_hist_audit to reflect the operation performed on standby_list,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.standby_list_hist SELECT nextval('standby_list_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.standby_list_hist SELECT nextval('standby_list_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.standby_list_hist SELECT nextval('standby_list_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS standby_list_audit on public.standby_list;
-CREATE TRIGGER standby_list_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.standby_list
- FOR EACH ROW EXECUTE PROCEDURE process_standby_list_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_planning_status.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_planning_status.sql
index 0b0a4d8..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_planning_status.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_planning_status.sql
@@ -1,24 +1 @@
-/*Standby_planning_status History*/
-CREATE TABLE IF NOT EXISTS STANDBY_PLANNING_STATUS_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE STANDBY_PLANNING_STATUS EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_standby_planning_status_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.standby_planning_status_hist_audit to reflect the operation performed on standby_planning_status,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.standby_planning_status_hist SELECT nextval('standby_planning_status_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.standby_planning_status_hist SELECT nextval('standby_planning_status_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.standby_planning_status_hist SELECT nextval('standby_planning_status_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS standby_planning_status_audit on public.standby_planning_status;
-CREATE TRIGGER standby_planning_status_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.standby_planning_status
- FOR EACH ROW EXECUTE PROCEDURE process_standby_planning_status_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_body.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_body.sql
index 3b2ffc2..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_body.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_body.sql
@@ -1,24 +1 @@
-/*Standby_schedule_body History*/
-CREATE TABLE IF NOT EXISTS STANDBY_SCHEDULE_BODY_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE STANDBY_SCHEDULE_BODY EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_standby_schedule_body_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.standby_schedule_body_hist_audit to reflect the operation performed on standby_schedule_body,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.standby_schedule_body_hist SELECT nextval('standby_schedule_body_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.standby_schedule_body_hist SELECT nextval('standby_schedule_body_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.standby_schedule_body_hist SELECT nextval('standby_schedule_body_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS standby_schedule_body_audit on public.standby_schedule_body;
-CREATE TRIGGER standby_schedule_body_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.standby_schedule_body
- FOR EACH ROW EXECUTE PROCEDURE process_standby_schedule_body_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_header.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_header.sql
index 099f458..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_header.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_header.sql
@@ -1,24 +1 @@
-/*Standby_schedule_header History*/
-CREATE TABLE IF NOT EXISTS STANDBY_SCHEDULE_HEADER_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE STANDBY_SCHEDULE_HEADER EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_standby_schedule_header_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.standby_schedule_header_hist_audit to reflect the operation performed on standby_schedule_header,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.standby_schedule_header_hist SELECT nextval('standby_schedule_header_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.standby_schedule_header_hist SELECT nextval('standby_schedule_header_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.standby_schedule_header_hist SELECT nextval('standby_schedule_header_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS standby_schedule_header_audit on public.standby_schedule_header;
-CREATE TRIGGER standby_schedule_header_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.standby_schedule_header
- FOR EACH ROW EXECUTE PROCEDURE process_standby_schedule_header_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_history.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_history.sql
index c54fee2..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_history.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_schedule_history.sql
@@ -1,24 +1 @@
-/*Location History*/
-CREATE TABLE IF NOT EXISTS LOCATION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE LOCATION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_location_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.location_hist_audit to reflect the operation performed on location,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.location_hist SELECT nextval('location_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.location_hist SELECT nextval('location_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.location_hist SELECT nextval('location_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS location_audit on public.location;
-CREATE TRIGGER location_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.location
- FOR EACH ROW EXECUTE PROCEDURE process_location_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_status.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_status.sql
index 9873415..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_status.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_status.sql
@@ -1,24 +1 @@
-/*Standby_status History*/
-CREATE TABLE IF NOT EXISTS STANDBY_STATUS_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE STANDBY_STATUS EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_standby_status_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.standby_status_hist_audit to reflect the operation performed on standby_status,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.standby_status_hist SELECT nextval('standby_status_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.standby_status_hist SELECT nextval('standby_status_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.standby_status_hist SELECT nextval('standby_status_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS standby_status_audit on public.standby_status;
-CREATE TRIGGER standby_status_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.standby_status
- FOR EACH ROW EXECUTE PROCEDURE process_standby_status_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_user.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_user.sql
index 5a4c6c4..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_user.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_standby_user.sql
@@ -1,24 +1 @@
-/*Standby_user History*/
-CREATE TABLE IF NOT EXISTS STANDBY_USER_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE STANDBY_USER EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_standby_user_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.standby_user_hist_audit to reflect the operation performed on standby_user,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.standby_user_hist SELECT nextval('standby_user_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.standby_user_hist SELECT nextval('standby_user_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.standby_user_hist SELECT nextval('standby_user_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS standby_user_audit on public.standby_user;
-CREATE TRIGGER standby_user_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.standby_user
- FOR EACH ROW EXECUTE PROCEDURE process_standby_user_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_function.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_function.sql
index c6491e4..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_function.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_function.sql
@@ -1,24 +1 @@
-/*user_function History*/
-CREATE TABLE IF NOT EXISTS USER_FUNCTION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE USER_FUNCTION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_user_function_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.user_function_hist_audit to reflect the operation performed on user_function,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.user_function_hist SELECT nextval('user_function_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.user_function_hist SELECT nextval('user_function_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.user_function_hist SELECT nextval('user_function_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS user_function_audit on public.user_function;
-CREATE TRIGGER user_function_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.user_function
- FOR EACH ROW EXECUTE PROCEDURE process_user_function_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_has_user_function.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_has_user_function.sql
index 9388c76..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_has_user_function.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_has_user_function.sql
@@ -1,24 +1 @@
-/*User_has_user_function History*/
-CREATE TABLE IF NOT EXISTS USER_HAS_USER_FUNCTION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE USER_HAS_USER_FUNCTION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_user_has_user_function_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.user_has_user_function_hist_audit to reflect the operation performed on user_has_user_function,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.user_has_user_function_hist SELECT nextval('user_has_user_function_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.user_has_user_function_hist SELECT nextval('user_has_user_function_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.user_has_user_function_hist SELECT nextval('user_has_user_function_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS user_has_user_function_audit on public.user_has_user_function;
-CREATE TRIGGER user_has_user_function_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.user_has_user_function
- FOR EACH ROW EXECUTE PROCEDURE process_user_has_user_function_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_in_region.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_in_region.sql
index 3e70a6d..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_in_region.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_in_region.sql
@@ -1,24 +1 @@
-/*user_in_region History*/
-CREATE TABLE IF NOT EXISTS USER_IN_REGION_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE USER_IN_REGION EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_user_in_region_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.user_in_region_hist_audit to reflect the operation performed on user_in_region,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.user_in_region_hist SELECT nextval('user_in_region_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.user_in_region_hist SELECT nextval('user_in_region_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.user_in_region_hist SELECT nextval('user_in_region_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS user_in_region_audit on public.user_in_region;
-CREATE TRIGGER user_in_region_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.user_in_region
- FOR EACH ROW EXECUTE PROCEDURE process_user_in_region_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_in_standby_group.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_in_standby_group.sql
index 1670197..beae8b6 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_in_standby_group.sql
+++ b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/oracle/hist/BER_hist_user_in_standby_group.sql
@@ -1,24 +1 @@
-/*User_in_standby_group History*/
-CREATE TABLE IF NOT EXISTS USER_IN_STANDBY_GROUP_HIST (HIST_ID serial, operation char(1), stamp timestamp, LIKE USER_IN_STANDBY_GROUP EXCLUDING ALL);
-
-CREATE OR REPLACE FUNCTION process_user_in_standby_group_audit() RETURNS TRIGGER AS $object_audit$
- BEGIN
- --
- -- Create a row in public.user_in_standby_group_hist_audit to reflect the operation performed on user_in_standby_group,
- -- making use of the special variable TG_OP to work out the operation.
- --
- IF (TG_OP = 'DELETE') THEN
- INSERT INTO public.user_in_standby_group_hist SELECT nextval('user_in_standby_group_hist_hist_id_seq'), 'D', now(), OLD.*;
- ELSIF (TG_OP = 'UPDATE') THEN
- INSERT INTO public.user_in_standby_group_hist SELECT nextval('user_in_standby_group_hist_hist_id_seq'), 'U', now(), NEW.*;
- ELSIF (TG_OP = 'INSERT') THEN
- INSERT INTO public.user_in_standby_group_hist SELECT nextval('user_in_standby_group_hist_hist_id_seq'), 'I', now(), NEW.*;
- END IF;
- RETURN NULL; -- result is ignored since this is an AFTER trigger
- END;
-$object_audit$ LANGUAGE plpgsql;
-
-DROP TRIGGER IF EXISTS user_in_standby_group_audit on public.user_in_standby_group;
-CREATE TRIGGER user_in_standby_group_audit
-AFTER INSERT OR UPDATE OR DELETE ON public.user_in_standby_group
- FOR EACH ROW EXECUTE PROCEDURE process_user_in_standby_group_audit();
\ No newline at end of file
+--BER_HIST_ tables will be defined during the BER_hist.sql script manually for oracle.
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/postgres/hist/BER_Trigger.sql b/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/postgres/hist/BER_Trigger.sql
deleted file mode 100644
index 4a77396..0000000
--- a/oKBereitschaftsplanungBackend/src/main/resources/META-INF/sql/postgres/hist/BER_Trigger.sql
+++ /dev/null
@@ -1 +0,0 @@
---No Trigger needed for postgres
\ No newline at end of file
diff --git a/oKBereitschaftsplanungBackend/src/main/resources/application.properties b/oKBereitschaftsplanungBackend/src/main/resources/application.properties
index dd25e7c..cef8ba8 100644
--- a/oKBereitschaftsplanungBackend/src/main/resources/application.properties
+++ b/oKBereitschaftsplanungBackend/src/main/resources/application.properties
@@ -12,8 +12,8 @@
# oracle
#------------------------------------
#db.driver=oracle.jdbc.OracleDriver
-#db.url=jdbc:oracle:thin:${user}/${password}@//$db_hostname}:${db_portnumber}/${db_name}
-#jdbc:jdbc:oracle://$db_hostname}:${db_portnumber}/${db_name}
+#db.url=jdbc:oracle:thin:openk/openk@//serverName.de:port/seviceName
+#jdbc:jdbc:oracle://serverName.de:port/serviceName
#db.username=OPENK
#db.password=openk
#db.plattform=org.eclipse.persistence.platform.database.OraclePlatform
@@ -44,7 +44,8 @@
#SQL-init-scripts
sql.scripts.delete=delete/BER_delete_from
sql.scripts.init=init/BER_insert_standby_status,init/BER_insert_postcode,init/BER_insert_branch,init/BER_insert_user_function,init/BER_insert_location,init/BER_insert_int_location_has_postcode,init/BER_insert_region,init/BER_insert_int_regions_in_location,init/BER_insert_address,init/BER_insert_organisation,init/BER_insert_contact_data,init/BER_insert_standby_user,init/BER_insert_standby_group,init/BER_insert_user_in_region,init/BER_insert_int_standbygroup_has_function,init/BER_insert_standby_list,init/BER_insert_standby_list_has_standby_group,init/BER_insert_standby_schedule_body,init/BER_insert_standby_duration,init/BER_insert_int_branches_for_group,init/BER_insert_int_regions_for_standby_group,init/BER_insert_location_for_branch,init/BER_insert_user_in_standby_group
-sql.scripts.hist=hist/BER_Trigger,hist/BER_hist_address,hist/BER_hist_branch,hist/BER_hist_calendar,hist/BER_hist_contact_data,hist/BER_hist_int_branches_for_groups,hist/BER_hist_int_branches_for_group,hist/BER_hist_int_groups_in_list,hist/BER_hist_int_location_has_postcode,hist/BER_hist_int_regions_in_location,hist/BER_hist_location,hist/BER_hist_location_for_branch,hist/BER_hist_organisation,hist/BER_hist_postcode,hist/BER_hist_region,hist/BER_hist_standby_duration,hist/BER_hist_standby_group,hist/BER_hist_standby_list,hist/BER_hist_standby_planning_status,hist/BER_hist_standby_schedule_body,hist/BER_hist_standby_schedule_header,hist/BER_hist_standby_schedule_history,hist/BER_hist_standby_status,hist/BER_hist_standby_user,hist/BER_hist_user_function,hist/BER_hist_user_has_user_function,hist/BER_hist_user_in_region,hist/BER_hist_user_in_standby_group,hist/BER_hist_int_standbygroup_has_function
+sql.scripts.hist=hist/BER_hist_address,hist/BER_hist_branch,hist/BER_hist_calendar,hist/BER_hist_contact_data,hist/BER_hist_int_branches_for_groups,hist/BER_hist_int_groups_in_list,hist/BER_hist_int_location_has_postcode,hist/BER_hist_int_regions_in_location,hist/BER_hist_location,hist/BER_hist_location_for_branch,hist/BER_hist_organisation,hist/BER_hist_postcode,hist/BER_hist_region,hist/BER_hist_standby_duration,hist/BER_hist_standby_group,hist/BER_hist_standby_list,hist/BER_hist_standby_planning_status,hist/BER_hist_standby_schedule_body,hist/BER_hist_standby_schedule_header,hist/BER_hist_standby_schedule_history,hist/BER_hist_standby_status,hist/BER_hist_standby_user,hist/BER_hist_user_function,hist/BER_hist_user_has_user_function,hist/BER_hist_user_in_region,hist/BER_hist_user_in_standby_group,hist/BER_hist_int_standbygroup_has_function
+
#Mail
mail.template.path=mail
smtp.active=true