Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
5296:55122db34cd0 | 5297:4f3cc1aebcc0 |
---|---|
244 a NUMBER(38,10) NOT NULL, | 244 a NUMBER(38,10) NOT NULL, |
245 b NUMBER(38,10), | 245 b NUMBER(38,10), |
246 river_id NUMBER(38,0), | 246 river_id NUMBER(38,0), |
247 PRIMARY KEY (id) | 247 PRIMARY KEY (id) |
248 ); | 248 ); |
249 CREATE OR REPLACE TRIGGER ranges_trigger BEFORE INSERT ON ranges FOR EACH ROW | |
250 BEGIN | |
251 SELECT RANGES_ID_SEQ.nextval INTO :new.id FROM dual; | |
252 END; | |
253 / | |
249 | 254 |
250 | 255 |
251 -- RIVERS | 256 -- RIVERS |
252 CREATE SEQUENCE RIVERS_ID_SEQ; | 257 CREATE SEQUENCE RIVERS_ID_SEQ; |
253 | 258 |