Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql.sql @ 470:f4afea9b7537
Forget ',' in schema.
flys-backend/trunk@1709 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 15 Apr 2011 15:28:35 +0000 |
parents | c8c09e31cdb8 |
children | 3570e4af8cb2 |
comparison
equal
deleted
inserted
replaced
469:b5ca22aae092 | 470:f4afea9b7537 |
---|---|
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 kind int NOT NULL DEFAULT 0 | 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 kind int NOT NULL DEFAULT 0, |
144 -- TODO: more meta infos | 144 -- TODO: more meta infos |
145 UNIQUE (river_id, description) | 145 UNIQUE (river_id, description) |
146 ); | 146 ); |
147 | 147 |
148 -- columns of WST files | 148 -- columns of WST files |