comparison flys-backend/doc/schema/postgresql.sql @ 1214:32ee9babe42c

Schema: Argh! Added distance_{vl|hf|vr} to wrong table. flys-backend/trunk@2340 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 15 Jul 2011 15:53:33 +0000
parents dd948530fd57
children d5e39c16fd2a
comparison
equal deleted inserted replaced
1213:cc88db4a5b34 1214:32ee9babe42c
306 306
307 CREATE TABLE hyk_entries ( 307 CREATE TABLE hyk_entries (
308 id int PRIMARY KEY NOT NULL, 308 id int PRIMARY KEY NOT NULL,
309 hyk_id int NOT NULL REFERENCES hyks(id), 309 hyk_id int NOT NULL REFERENCES hyks(id),
310 km NUMERIC NOT NULL, 310 km NUMERIC NOT NULL,
311 distance_vl NUMERIC NOT NULL,
312 distance_hf NUMERIC NOT NULL,
313 distance_vr NUMERIC NOT NULL,
314 UNIQUE (hyk_id, km) 311 UNIQUE (hyk_id, km)
315 ); 312 );
316 313
317 CREATE SEQUENCE HYK_FORMATIONS_ID_SEQ; 314 CREATE SEQUENCE HYK_FORMATIONS_ID_SEQ;
318 315
320 id int PRIMARY KEY NOT NULL, 317 id int PRIMARY KEY NOT NULL,
321 formation_num int NOT NULL DEFAULT 0, 318 formation_num int NOT NULL DEFAULT 0,
322 hyk_entry_id int NOT NULL REFERENCES hyk_entries(id), 319 hyk_entry_id int NOT NULL REFERENCES hyk_entries(id),
323 top NUMERIC NOT NULL, 320 top NUMERIC NOT NULL,
324 bottom NUMERIC NOT NULL, 321 bottom NUMERIC NOT NULL,
322 distance_vl NUMERIC NOT NULL,
323 distance_hf NUMERIC NOT NULL,
324 distance_vr NUMERIC NOT NULL,
325 UNIQUE (hyk_entry_id, formation_num) 325 UNIQUE (hyk_entry_id, formation_num)
326 ); 326 );
327 327
328 CREATE SEQUENCE HYK_FLOW_ZONE_TYPES_ID_SEQ; 328 CREATE SEQUENCE HYK_FLOW_ZONE_TYPES_ID_SEQ;
329 329

http://dive4elements.wald.intevation.org