comparison backend/doc/schema/postgresql-minfo.sql @ 8691:bfca77cbf353

(issue1750) There can be only one SQ-relation of a parameter for a time range (given by sq_relation_id) per station and some other attributes might be null.
author Tom Gottfried <tom@intevation.de>
date Fri, 17 Apr 2015 14:55:42 +0200
parents 1a4ad0d4231a
children 71b17f731762
comparison
equal deleted inserted replaced
8690:11c88a2f695a 8691:bfca77cbf353
397 ntot int, 397 ntot int,
398 noutl int, 398 noutl int,
399 cferguson NUMERIC, 399 cferguson NUMERIC,
400 cduan NUMERIC, 400 cduan NUMERIC,
401 PRIMARY KEY (id), 401 PRIMARY KEY (id),
402 UNIQUE(sq_relation_id, measurement_station_id, parameter),
402 CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) 403 CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id)
403 REFERENCES sq_relation(id) ON DELETE CASCADE, 404 REFERENCES sq_relation(id) ON DELETE CASCADE,
404 CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) 405 CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id)
405 REFERENCES measurement_station(id) ON DELETE CASCADE 406 REFERENCES measurement_station(id) ON DELETE CASCADE
406 ); 407 );

http://dive4elements.wald.intevation.org