Mercurial > dive4elements > river
comparison backend/doc/schema/oracle-minfo.sql @ 7981:45cced06490c facet-metadata
merged with default.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 30 Jun 2014 11:29:45 +0200 |
parents | a88e308567a1 |
children | bcb05a98bb3f |
comparison
equal
deleted
inserted
replaced
7894:42076d94977e | 7981:45cced06490c |
---|---|
57 CONSTRAINT fk_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id), | 57 CONSTRAINT fk_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id), |
58 CONSTRAINT fk_range FOREIGN KEY (range_id) REFERENCES ranges(id) ON DELETE CASCADE | 58 CONSTRAINT fk_range FOREIGN KEY (range_id) REFERENCES ranges(id) ON DELETE CASCADE |
59 ); | 59 ); |
60 | 60 |
61 | 61 |
62 CREATE SEQUENCE BED_HEIGHT_EPOCH_ID_SEQ; | |
63 | |
64 CREATE TABLE bed_height_epoch ( | |
65 id NUMBER(38,0) NOT NULL, | |
66 river_id NUMBER(38,0) NOT NULL, | |
67 time_interval_id NUMBER(38,0) NOT NULL, | |
68 -- sounding_with NUMBER(38,0) NOT NULL, | |
69 -- type_id NUMBER(38,0) NOT NULL, | |
70 cur_elevation_model_id NUMBER(38,0) NOT NULL, | |
71 old_elevation_model_id NUMBER(38,0), | |
72 range_id NUMBER(38,0), | |
73 evaluation_by VARCHAR(255), | |
74 description VARCHAR(255), | |
75 PRIMARY KEY(id), | |
76 CONSTRAINT fk_time_interval FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id), | |
77 CONSTRAINT fk_epoch_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id), | |
78 CONSTRAINT fk_epoch_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id), | |
79 CONSTRAINT fk_epoch_range FOREIGN KEY (range_id) REFERENCES ranges(id) ON DELETE CASCADE | |
80 ); | |
81 | |
82 | |
83 CREATE SEQUENCE BED_SINGLE_VALUES_ID_SEQ; | 62 CREATE SEQUENCE BED_SINGLE_VALUES_ID_SEQ; |
84 | 63 |
85 CREATE TABLE bed_height_single_values ( | 64 CREATE TABLE bed_height_single_values ( |
86 id NUMBER(38,0) NOT NULL, | 65 id NUMBER(38,0) NOT NULL, |
87 bed_height_single_id NUMBER(38,0) NOT NULL, | 66 bed_height_single_id NUMBER(38,0) NOT NULL, |
92 sounding_width DOUBLE PRECISION, | 71 sounding_width DOUBLE PRECISION, |
93 width DOUBLE PRECISION, | 72 width DOUBLE PRECISION, |
94 PRIMARY KEY(id), | 73 PRIMARY KEY(id), |
95 UNIQUE (station, bed_height_single_id), | 74 UNIQUE (station, bed_height_single_id), |
96 CONSTRAINT fk_bed_single_values_parent FOREIGN KEY (bed_height_single_id) REFERENCES bed_height_single(id) ON DELETE CASCADE | 75 CONSTRAINT fk_bed_single_values_parent FOREIGN KEY (bed_height_single_id) REFERENCES bed_height_single(id) ON DELETE CASCADE |
97 ); | |
98 | |
99 | |
100 CREATE SEQUENCE BED_EPOCH_VALUES_ID_SEQ; | |
101 | |
102 CREATE TABLE bed_height_epoch_values ( | |
103 id NUMBER(38,0) NOT NULL, | |
104 bed_height_epoch_id NUMBER(38,0) NOT NULL, | |
105 station NUMBER(38,2) NOT NULL, | |
106 height NUMBER(38,2), | |
107 PRIMARY KEY(id), | |
108 CONSTRAINT fk_bed_epoch_values_parent FOREIGN KEY (bed_height_epoch_id) REFERENCES bed_height_epoch(id) ON DELETE CASCADE | |
109 ); | 76 ); |
110 | 77 |
111 | 78 |
112 CREATE SEQUENCE DEPTHS_ID_SEQ; | 79 CREATE SEQUENCE DEPTHS_ID_SEQ; |
113 | 80 |