Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql.sql @ 471:3570e4af8cb2
Added 'position' column to wst_columns to allow order them by there column position in the original wst file.
flys-backend/trunk@1710 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 15 Apr 2011 16:06:15 +0000 |
parents | f4afea9b7537 |
children | 77f337650211 |
comparison
equal
deleted
inserted
replaced
470:f4afea9b7537 | 471:3570e4af8cb2 |
---|---|
151 CREATE TABLE wst_columns ( | 151 CREATE TABLE wst_columns ( |
152 id int PRIMARY KEY NOT NULL, | 152 id int PRIMARY KEY NOT NULL, |
153 wst_id int NOT NULL REFERENCES wsts(id), | 153 wst_id int NOT NULL REFERENCES wsts(id), |
154 name VARCHAR(256) NOT NULL, | 154 name VARCHAR(256) NOT NULL, |
155 description VARCHAR(256), | 155 description VARCHAR(256), |
156 position int NOT NULL DEFAULT 0, | |
156 | 157 |
157 time_interval_id int REFERENCES time_intervals(id), | 158 time_interval_id int REFERENCES time_intervals(id), |
158 | 159 |
159 UNIQUE (wst_id, name) | 160 UNIQUE (wst_id, name), |
161 UNIQUE (wst_id, position) | |
160 ); | 162 ); |
161 | 163 |
162 -- w values in WST file column | 164 -- w values in WST file column |
163 CREATE SEQUENCE WST_COLUMN_VALUES_ID_SEQ; | 165 CREATE SEQUENCE WST_COLUMN_VALUES_ID_SEQ; |
164 | 166 |