diff flys-backend/doc/schema/oracle.sql @ 5300:a82b621d87b0

merge
author Bettina Gruenbauer <bettina@intevation.de>
date Thu, 14 Mar 2013 14:36:32 +0100
parents eaa630838705
children 6dd354e7abfc
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle.sql	Thu Mar 14 14:35:51 2013 +0100
+++ b/flys-backend/doc/schema/oracle.sql	Thu Mar 14 14:36:32 2013 +0100
@@ -246,6 +246,11 @@
     river_id            NUMBER(38,0),
     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
@@ -271,6 +276,11 @@
     PRIMARY KEY         (id),
     CHECK (start_time <= stop_time)
 );
+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

http://dive4elements.wald.intevation.org