diff flys-backend/doc/schema/oracle.sql @ 5298:eaa630838705

trigger sequence of time_interval IDs in DB as it is not used by hibernate only anymore
author Tom Gottfried <tom@intevation.de>
date Thu, 14 Mar 2013 13:39:54 +0100
parents 4f3cc1aebcc0
children 6dd354e7abfc
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle.sql	Thu Mar 14 13:32:02 2013 +0100
+++ b/flys-backend/doc/schema/oracle.sql	Thu Mar 14 13:39:54 2013 +0100
@@ -276,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