Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
5297:4f3cc1aebcc0 | 5298:eaa630838705 |
---|---|
274 start_time TIMESTAMP NOT NULL, | 274 start_time TIMESTAMP NOT NULL, |
275 stop_time TIMESTAMP, | 275 stop_time TIMESTAMP, |
276 PRIMARY KEY (id), | 276 PRIMARY KEY (id), |
277 CHECK (start_time <= stop_time) | 277 CHECK (start_time <= stop_time) |
278 ); | 278 ); |
279 CREATE OR REPLACE TRIGGER time_intervals_trigger BEFORE INSERT ON time_intervals FOR EACH ROW | |
280 BEGIN | |
281 SELECT TIME_INTERVALS_ID_SEQ.nextval INTO :new.id FROM dual; | |
282 END; | |
283 / | |
279 | 284 |
280 | 285 |
281 --- UNITS | 286 --- UNITS |
282 CREATE SEQUENCE UNITS_ID_SEQ; | 287 CREATE SEQUENCE UNITS_ID_SEQ; |
283 | 288 |