comparison flys-backend/doc/schema/postgresql.sql @ 467:c8c09e31cdb8

Added new column 'kind' in discharge tables and wst to distinguish between different types. flys-backend/trunk@1703 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 15 Apr 2011 10:31:15 +0000
parents 0f0b98ef9b04
children f4afea9b7537
comparison
equal deleted inserted replaced
466:8bd50b41dea6 467:c8c09e31cdb8
112 CREATE SEQUENCE DISCHARGE_TABLES_ID_SEQ; 112 CREATE SEQUENCE DISCHARGE_TABLES_ID_SEQ;
113 113
114 CREATE TABLE discharge_tables ( 114 CREATE TABLE discharge_tables (
115 id int PRIMARY KEY NOT NULL, 115 id int PRIMARY KEY NOT NULL,
116 gauge_id int NOT NULL REFERENCES gauges(id), 116 gauge_id int NOT NULL REFERENCES gauges(id),
117 117 kind int NOT NULL DEFAULT 0
118 time_interval_id int REFERENCES time_intervals(id), 118 time_interval_id int REFERENCES time_intervals(id),
119 119
120 -- TODO: better checks 120 -- TODO: better checks
121 UNIQUE (gauge_id, time_interval_id) 121 UNIQUE (gauge_id, time_interval_id)
122 ); 122 );
138 138
139 CREATE TABLE wsts ( 139 CREATE TABLE wsts (
140 id int PRIMARY KEY NOT NULL, 140 id int PRIMARY KEY NOT NULL,
141 river_id int NOT NULL REFERENCES rivers(id), 141 river_id int NOT NULL REFERENCES rivers(id),
142 description VARCHAR(256) NOT NULL, 142 description VARCHAR(256) NOT NULL,
143 kind int NOT NULL DEFAULT 0
143 -- TODO: more meta infos 144 -- TODO: more meta infos
144 UNIQUE (river_id, description) 145 UNIQUE (river_id, description)
145 ); 146 );
146 147
147 -- columns of WST files 148 -- columns of WST files

http://dive4elements.wald.intevation.org