comparison flys-backend/doc/schema/postgresql.sql @ 5321:6dd354e7abfc

SCHEMA CHANGE: removed bad triggers and foreign keys from schema
author Tom Gottfried <tom@intevation.de>
date Fri, 15 Mar 2013 16:43:00 +0100
parents eaa630838705
children 88cbe798cbab
comparison
equal deleted inserted replaced
5320:a7778435a4af 5321:6dd354e7abfc
34 river_id int NOT NULL REFERENCES rivers(id) ON DELETE CASCADE, 34 river_id int NOT NULL REFERENCES rivers(id) ON DELETE CASCADE,
35 a NUMERIC NOT NULL, 35 a NUMERIC NOT NULL,
36 b NUMERIC, 36 b NUMERIC,
37 UNIQUE (river_id, a, b) 37 UNIQUE (river_id, a, b)
38 ); 38 );
39 ALTER TABLE ranges ALTER COLUMN id SET DEFAULT NEXTVAL('RANGES_ID_SEQ');
40 39
41 40
42 -- Lage 'links', 'rechts', etc. 41 -- Lage 'links', 'rechts', etc.
43 CREATE SEQUENCE POSITIONS_ID_SEQ; 42 CREATE SEQUENCE POSITIONS_ID_SEQ;
44 43
123 id int PRIMARY KEY NOT NULL, 122 id int PRIMARY KEY NOT NULL,
124 start_time TIMESTAMP NOT NULL, 123 start_time TIMESTAMP NOT NULL,
125 stop_time TIMESTAMP, 124 stop_time TIMESTAMP,
126 CHECK (start_time <= stop_time) 125 CHECK (start_time <= stop_time)
127 ); 126 );
128 ALTER TABLE time_intervals ALTER COLUMN id SET DEFAULT NEXTVAL('TIME_INTERVALS_ID_SEQ');
129 127
130 128
131 -- Stammdaten 129 -- Stammdaten
132 CREATE SEQUENCE MAIN_VALUES_ID_SEQ; 130 CREATE SEQUENCE MAIN_VALUES_ID_SEQ;
133 131

http://dive4elements.wald.intevation.org