Mercurial > dive4elements > river
comparison backend/doc/schema/oracle.sql @ 5923:131f5f58ff7d
Schema change: leave it up to AFT whether time intervals are unique per gauge but do not accept duplicate bfg_id per gauge
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 08 May 2013 13:16:29 +0200 |
parents | 4fafe8d147b2 |
children | 6ea171b6d8d2 |
comparison
equal
deleted
inserted
replaced
5922:8ed9b1edace6 | 5923:131f5f58ff7d |
---|---|
95 bfg_id VARCHAR2(50), | 95 bfg_id VARCHAR2(50), |
96 kind NUMBER(38,0) NOT NULL DEFAULT 0, | 96 kind NUMBER(38,0) NOT NULL DEFAULT 0, |
97 gauge_id NUMBER(38,0) NOT NULL, | 97 gauge_id NUMBER(38,0) NOT NULL, |
98 time_interval_id NUMBER(38,0), | 98 time_interval_id NUMBER(38,0), |
99 PRIMARY KEY (id), | 99 PRIMARY KEY (id), |
100 UNIQUE(gauge_id, time_interval_id, kind) | 100 UNIQUE(gauge_id, bfg_id, kind) |
101 ); | 101 ); |
102 | 102 |
103 | 103 |
104 -- EDGES | 104 -- EDGES |
105 CREATE SEQUENCE EDGES_ID_SEQ; | 105 CREATE SEQUENCE EDGES_ID_SEQ; |