diff flys-backend/doc/schema/oracle.sql @ 2354:40093215061b

Removed all CREATE OR REPLACE TRIGGER statements. flys-backend/trunk@2999 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Schilberg <bjoern@intevation.de>
date Tue, 18 Oct 2011 10:25:00 +0000
parents 67e0371f6f40
children cf8dcfaeb756
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle.sql	Mon Oct 17 12:10:12 2011 +0000
+++ b/flys-backend/doc/schema/oracle.sql	Tue Oct 18 10:25:00 2011 +0000
@@ -7,11 +7,6 @@
     PRIMARY KEY     (id)
 );
 
-CREATE OR REPLACE TRIGGER annotation_types_trigger BEFORE INSERT ON annotation_types FOR each ROW
-    BEGIN
-        SELECT ANNOTATION_TYPES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
 
 -- ANNOTATIONS
 CREATE SEQUENCE ANNOTATIONS_ID_SEQ;
@@ -26,12 +21,6 @@
     PRIMARY KEY     (id)
 );
 
-CREATE OR REPLACE TRIGGER annotations_trigger BEFORE INSERT ON annotations FOR each ROW
-    BEGIN
-        SELECT ANNOTATIONS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- ATTRIBUTES 
 CREATE SEQUENCE ATTRIBUTES_ID_SEQ;
@@ -42,11 +31,6 @@
     primary key     (id)
 );
 
-CREATE OR REPLACE TRIGGER attributes_trigger BEFORE INSERT ON attributes FOR each ROW
-    BEGIN
-        SELECT ATTRIBUTES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
 
 -- CROSS_SECTION_LINES
 CREATE SEQUENCE CROSS_SECTION_LINES_ID_SEQ;
@@ -58,12 +42,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER cross_section_lines_trigger BEFORE INSERT ON cross_section_lines FOR each ROW
-    BEGIN
-        SELECT CROSS_SECTION_LINES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- CROSS_SECTION_POINTS
 CREATE SEQUENCE CROSS_SECTION_POINTS_ID_SEQ;
@@ -77,12 +55,6 @@
     PRIMARY KEY             (id)
 );
 
-CREATE OR REPLACE TRIGGER cross_section_points_trigger BEFORE INSERT ON cross_section_points FOR each ROW
-    BEGIN
-        SELECT CROSS_SECTION_POINTS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- CROSS_SECTIONS
 create sequence CROSS_SECTIONS_ID_SEQ;
@@ -95,12 +67,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER cross_sections_trigger BEFORE INSERT ON cross_sections FOR each ROW
-    BEGIN
-        SELECT CROSS_SECTIONS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- DISCHARGE_TABLE_VALUES
 CREATE SEQUENCE DISCHARGE_TABLE_VALUES_ID_SEQ;
@@ -113,12 +79,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER discharge_table_values_trigger BEFORE INSERT ON discharge_table_values FOR each ROW
-    BEGIN
-        SELECT DISCHARGE_TABLE_VALUES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- DISCHARGE_TABLES
 CREATE SEQUENCE DISCHARGE_TABLES_ID_SEQ;
@@ -132,12 +92,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER discharge_tables_trigger BEFORE INSERT ON discharge_tables FOR each ROW
-    BEGIN
-        SELECT DISCHARGE_TABLES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- EDGES
 CREATE SEQUENCE EDGES_ID_SEQ;
@@ -149,11 +103,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER edges_trigger BEFORE INSERT ON edges FOR each ROW
-    BEGIN
-        SELECT EDGES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
 
 -- GAUGES
 CREATE SEQUENCE GAUGES_ID_SEQ;
@@ -169,12 +118,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER gauges_trigger BEFORE INSERT ON gauges FOR each ROW
-    BEGIN
-        SELECT GAUGES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- HYK_ENTRIES
 CREATE SEQUENCE HYK_ENTRIES_ID_SEQ;
@@ -187,12 +130,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER hyk_entries_trigger BEFORE INSERT ON hyk_entries FOR each ROW
-    BEGIN
-        SELECT HYK_ENTRIES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- HYK_FLOW_ZONE_TYPES
 CREATE SEQUENCE HYK_FLOW_ZONE_TYPES_ID_SEQ;
@@ -204,11 +141,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER hyk_flow_zone_types_trigger BEFORE INSERT ON hyk_flow_zone_types FOR each ROW
-    BEGIN
-        SELECT HYK_FLOW_ZONE_TYPES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
 
 -- HYK_FLOW_ZONES
 CREATE SEQUENCE HYK_FLOW_ZONES_ID_SEQ;
@@ -222,12 +154,6 @@
     primary key         (id)
 );
 
-CREATE OR REPLACE TRIGGER hyk_flow_zones_trigger BEFORE INSERT ON hyk_flow_zones FOR each ROW
-    BEGIN
-        SELECT HYK_FLOW_ZONES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- HYK_FORMATIONS
 CREATE SEQUENCE HYK_FORMATIONS_ID_SEQ;
@@ -244,12 +170,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER hyk_formations_trigger BEFORE INSERT ON hyk_formations FOR each ROW
-    BEGIN
-        SELECT HYK_FORMATIONS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- HYKS
 CREATE SEQUENCE HYKS_ID_SEQ;
@@ -261,12 +181,6 @@
     primary key         (id)
 );
 
-CREATE OR REPLACE TRIGGER hyks_trigger BEFORE INSERT ON hyks FOR each ROW
-    BEGIN
-        SELECT HYKS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- MAIN_VALUE_TYPES
 CREATE SEQUENCE MAIN_VALUE_TYPES_ID_SEQ;
@@ -277,11 +191,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER main_value_types_trigger BEFORE INSERT ON main_value_types FOR each ROW
-    BEGIN
-        SELECT MAIN_VALUE_TYPES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
 
 -- MAIN_VALUES
 CREATE SEQUENCE MAIN_VALUES_ID_SEQ;
@@ -295,12 +204,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER main_values_trigger BEFORE INSERT ON main_values FOR each ROW
-    BEGIN
-        SELECT MAIN_VALUES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- NAMED_MAIN_VALUES
 CREATE SEQUENCE NAMED_MAIN_VALUES_ID_SEQ;
@@ -312,12 +215,6 @@
     PRIMARY KEY (id)
 );
 
-CREATE OR REPLACE TRIGGER named_main_values_trigger BEFORE INSERT ON named_main_values FOR each ROW
-    BEGIN
-        SELECT NAMED_MAIN_VALUES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- POSITIONS
 CREATE SEQUENCE POSITIONS_ID_SEQ;
@@ -328,11 +225,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER positions_trigger BEFORE INSERT ON positions FOR each ROW
-    BEGIN
-        SELECT POSITIONS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
 
 --- RANGES
 CREATE SEQUENCE RANGES_ID_SEQ;
@@ -345,12 +237,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER ranges_trigger BEFORE INSERT ON ranges FOR each ROW
-    BEGIN
-        SELECT RANGES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- RIVERS
 CREATE SEQUENCE RIVERS_ID_SEQ;
@@ -363,12 +249,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER rivers_trigger BEFORE INSERT ON rivers FOR each ROW
-    BEGIN
-        SELECT RIVERS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- TIME_INTERVALS
 CREATE SEQUENCE TIME_INTERVALS_ID_SEQ;
@@ -380,11 +260,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER time_intervals_trigger BEFORE INSERT ON time_intervals FOR each ROW
-    BEGIN
-        SELECT TIME_INTERVALS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
 
 --- UNITS
 CREATE SEQUENCE UNITS_ID_SEQ;
@@ -395,11 +270,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER units_trigger BEFORE INSERT ON units FOR each ROW
-    BEGIN
-        SELECT UNITS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
 
 -- WST_COLUMN_Q_RANGES
 CREATE SEQUENCE WST_COLUMN_Q_RANGES_ID_SEQ;
@@ -411,12 +281,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER wst_column_q_ranges_trigger BEFORE INSERT ON wst_column_q_ranges FOR each ROW
-    BEGIN
-        SELECT WST_COLUMN_Q_RANGES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- WST_COLUMN_VALUES
 CREATE SEQUENCE WST_COLUMN_VALUES_ID_SEQ;
@@ -429,12 +293,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER wst_column_values_trigger BEFORE INSERT ON wst_column_values FOR each ROW
-    BEGIN
-        SELECT WST_COLUMN_VALUES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- WST_COLUMNS
 CREATE SEQUENCE WST_COLUMNS_ID_SEQ;
@@ -449,12 +307,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER wst_columns_trigger BEFORE INSERT ON wst_columns FOR each ROW
-    BEGIN
-        SELECT WST_COLUMNS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- WST_Q_RANGES
 CREATE SEQUENCE WST_Q_RANGES_ID_SEQ;
@@ -466,12 +318,6 @@
     PRIMARY KEY         (id)
 );
 
-CREATE OR REPLACE TRIGGER wst_q_ranges_trigger BEFORE INSERT ON wst_q_ranges FOR each ROW
-    BEGIN
-        SELECT WST_Q_RANGES_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
 
 -- WSTS
 CREATE SEQUENCE WSTS_ID_SEQ;
@@ -485,13 +331,6 @@
 );
 
 
-CREATE OR REPLACE TRIGGER wsts_trigger BEFORE INSERT ON wsts FOR each ROW
-    BEGIN
-        SELECT WSTS_ID_SEQ.nextval INTO :new.id FROM dual;
-    END;
-/
-
-
 -- ADD CONSTRAINTs
 ALTER TABLE annotations ADD CONSTRAINT cAnnotationsRanges FOREIGN KEY (range_id) REFERENCES ranges;
 ALTER TABLE annotations ADD CONSTRAINT cAnnotationsEdges FOREIGN KEY (edge_id) REFERENCES edges;

http://dive4elements.wald.intevation.org