Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql-minfo.sql @ 5426:6875a9f02097
SCHEMA CHANGE! Renamed columns in sq_relation and sq_relation_value.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 26 Mar 2013 13:56:08 +0100 |
parents | e88d55d01cf5 |
children | 7c1dd9c3f6bd |
comparison
equal
deleted
inserted
replaced
5425:a137cbab32a8 | 5426:6875a9f02097 |
---|---|
317 | 317 |
318 | 318 |
319 CREATE SEQUENCE SQ_RELATION_VALUES_ID_SEQ; | 319 CREATE SEQUENCE SQ_RELATION_VALUES_ID_SEQ; |
320 | 320 |
321 CREATE TABLE sq_relation_value ( | 321 CREATE TABLE sq_relation_value ( |
322 id int NOT NULL, | 322 id int NOT NULL, |
323 sq_relation_id int NOT NULL, | 323 sq_relation_id int NOT NULL, |
324 m_station_id int NOT NULL, | 324 measurement_station_id int NOT NULL, |
325 parameter VARCHAR(16) NOT NULL, | 325 parameter VARCHAR(16) NOT NULL, |
326 fraction VARCHAR(32) NOT NULL, | 326 fraction VARCHAR(32) NOT NULL, |
327 a NUMERIC NOT NULL, | 327 a NUMERIC NOT NULL, |
328 b NUMERIC NOT NULL, | 328 b NUMERIC NOT NULL, |
329 q_max NUMERIC, | 329 qmax NUMERIC, |
330 r_sq NUMERIC, | 330 rsq NUMERIC, |
331 n_tot int, | 331 ntot int, |
332 n_outl int, | 332 noutl int, |
333 cferguson NUMERIC, | 333 cferguson NUMERIC, |
334 cduan NUMERIC, | 334 cduan NUMERIC, |
335 PRIMARY KEY (id), | 335 PRIMARY KEY (id), |
336 CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE, | 336 CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE, |
337 CONSTRAINT fk_mstation_id FOREIGN KEY (m_station_id) REFERENCES measurement_station(id) | 337 CONSTRAINT fk_mstation_id FOREIGN KEY (m_station_id) REFERENCES measurement_station(id) |
338 ); | 338 ); |
339 COMMIT; | 339 COMMIT; |