diff flys-backend/doc/schema/oracle.sql @ 5297:4f3cc1aebcc0

trigger sequence of range IDs in DB as it is not used by hibernate only anymore
author Tom Gottfried <tom@intevation.de>
date Thu, 14 Mar 2013 13:32:02 +0100
parents 2594904640c3
children eaa630838705
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle.sql	Thu Mar 14 12:53:36 2013 +0100
+++ b/flys-backend/doc/schema/oracle.sql	Thu Mar 14 13:32:02 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

http://dive4elements.wald.intevation.org