comparison flys-backend/doc/schema/postgresql-minfo.sql @ 5441:7c1dd9c3f6bd

remove unit from sediment density and depths (always t/m3 respectively cm, otherwise a typo)
author Tom Gottfried <tom.gottfried@intevation.de>
date Tue, 26 Mar 2013 19:29:39 +0100
parents 6875a9f02097
children b279f2d4bc78
comparison
equal deleted inserted replaced
5440:765013c837b1 5441:7c1dd9c3f6bd
112 112
113 CREATE TABLE depths ( 113 CREATE TABLE depths (
114 id int NOT NULL, 114 id int NOT NULL,
115 lower NUMERIC NOT NULL, 115 lower NUMERIC NOT NULL,
116 upper NUMERIC NOT NULL, 116 upper NUMERIC NOT NULL,
117 unit_id int NOT NULL, 117 PRIMARY KEY(id)
118 PRIMARY KEY(id),
119 CONSTRAINT fk_depths_unit_id FOREIGN KEY (unit_id) REFERENCES units(id)
120 ); 118 );
121 119
122 120
123 CREATE SEQUENCE SEDIMENT_DENSITY_ID_SEQ; 121 CREATE SEQUENCE SEDIMENT_DENSITY_ID_SEQ;
124 122
125 CREATE TABLE sediment_density ( 123 CREATE TABLE sediment_density (
126 id int NOT NULL, 124 id int NOT NULL,
127 river_id int NOT NULL, 125 river_id int NOT NULL,
128 depth_id int NOT NULL, 126 depth_id int NOT NULL,
129 unit_id int NOT NULL,
130 description VARCHAR(256), 127 description VARCHAR(256),
131 PRIMARY KEY(id), 128 PRIMARY KEY(id),
132 CONSTRAINT fk_sd_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE, 129 CONSTRAINT fk_sd_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE,
133 CONSTRAINT fk_sd_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id), 130 CONSTRAINT fk_sd_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id)
134 CONSTRAINT fk_sd_unit_id FOREIGN KEY (unit_id) REFERENCES units(id)
135 ); 131 );
136 132
137 133
138 CREATE SEQUENCE SEDIMENT_DENSITY_VALUES_ID_SEQ; 134 CREATE SEQUENCE SEDIMENT_DENSITY_VALUES_ID_SEQ;
139 135

http://dive4elements.wald.intevation.org