comparison backend/doc/schema/oracle-minfo.sql @ 7863:082284c4e0ad

Updated oracle minfo schema (added porosity).
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 08 May 2014 13:52:20 +0200
parents 5b5a2cc8210f
children 0c74b5f8de17
comparison
equal deleted inserted replaced
7862:cdef048c4ac5 7863:082284c4e0ad
142 density NUMBER(38,2) NOT NULL, 142 density NUMBER(38,2) NOT NULL,
143 description VARCHAR(256), 143 description VARCHAR(256),
144 year NUMBER(38,0), 144 year NUMBER(38,0),
145 PRIMARY KEY(id), 145 PRIMARY KEY(id),
146 CONSTRAINT fk_sdv_sediment_density_id FOREIGN KEY(sediment_density_id) REFERENCES sediment_density(id) ON DELETE CASCADE 146 CONSTRAINT fk_sdv_sediment_density_id FOREIGN KEY(sediment_density_id) REFERENCES sediment_density(id) ON DELETE CASCADE
147 );
148
149
150 CREATE SEQUENCE POROSITY_ID_SEQ;
151
152 CREATE TABLE porosity (
153 id NUMBER NOT NULL,
154 river_id NUMBER NOT NULL,
155 depth_id NUMBER NOT NULL,
156 description VARCHAR(256),
157 time_interval_id NUMBER NOT NULL,
158 PRIMARY KEY(id),
159 CONSTRAINT fk_p_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE,
160 CONSTRAINT fk_p_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id),
161 CONSTRAINT fk_p_time_interval_id FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id)
162 );
163
164
165 CREATE SEQUENCE POROSITY_VALUES_ID_SEQ;
166
167 CREATE TABLE porosity_values (
168 id NUMBER NOT NULL,
169 porosity_id NUMBER NOT NULL,
170 station NUMBER NOT NULL,
171 shore_offset NUMBER,
172 porosity NUMBER NOT NULL,
173 description VARCHAR(256),
174 PRIMARY KEY(id),
175 CONSTRAINT fk_pv_porosity_id FOREIGN KEY(porosity_id) REFERENCES porosity(id) ON DELETE CASCADE
147 ); 176 );
148 177
149 178
150 CREATE SEQUENCE MORPHOLOGIC_WIDTH_ID_SEQ; 179 CREATE SEQUENCE MORPHOLOGIC_WIDTH_ID_SEQ;
151 180

http://dive4elements.wald.intevation.org