comparison flys-backend/doc/schema/postgresql-minfo.sql @ 5321:6dd354e7abfc

SCHEMA CHANGE: removed bad triggers and foreign keys from schema
author Tom Gottfried <tom@intevation.de>
date Fri, 15 Mar 2013 16:43:00 +0100
parents 170f514a4f29
children e88d55d01cf5
comparison
equal deleted inserted replaced
5320:a7778435a4af 5321:6dd354e7abfc
190 190
191 CREATE SEQUENCE FLOW_VELOCITY_MODEL_ID_SEQ; 191 CREATE SEQUENCE FLOW_VELOCITY_MODEL_ID_SEQ;
192 192
193 CREATE TABLE flow_velocity_model ( 193 CREATE TABLE flow_velocity_model (
194 id int NOT NULL, 194 id int NOT NULL,
195 river_id int NOT NULL,
196 discharge_zone_id int NOT NULL, 195 discharge_zone_id int NOT NULL,
197 description VARCHAR(256), 196 description VARCHAR(256),
198 PRIMARY KEY (id), 197 PRIMARY KEY (id),
199 CONSTRAINT fk_fvm_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE,
200 CONSTRAINT fk_fvm_discharge_zone_id FOREIGN KEY (discharge_zone_id) REFERENCES discharge_zone (id) ON DELETE CASCADE 198 CONSTRAINT fk_fvm_discharge_zone_id FOREIGN KEY (discharge_zone_id) REFERENCES discharge_zone (id) ON DELETE CASCADE
201 ); 199 );
202 200
203 201
204 CREATE SEQUENCE FLOW_VELOCITY_M_VALUES_ID_SEQ; 202 CREATE SEQUENCE FLOW_VELOCITY_M_VALUES_ID_SEQ;
248 CREATE TABLE grain_fraction ( 246 CREATE TABLE grain_fraction (
249 id int NOT NULL, 247 id int NOT NULL,
250 name VARCHAR(64) NOT NULL, 248 name VARCHAR(64) NOT NULL,
251 lower NUMERIC, 249 lower NUMERIC,
252 upper NUMERIC, 250 upper NUMERIC,
253 unit_id int, 251 PRIMARY KEY (id),
254 PRIMARY KEY (id),
255 CONSTRAINT fk_gf_unit_id FOREIGN KEY (unit_id) REFERENCES units(id)
256 ); 252 );
257 253
258 254
259 CREATE SEQUENCE SEDIMENT_YIELD_ID_SEQ; 255 CREATE SEQUENCE SEDIMENT_YIELD_ID_SEQ;
260 256

http://dive4elements.wald.intevation.org