comparison flys-backend/doc/schema/postgresql-minfo.sql @ 5709:e89d922df8ae

Schema change: add constraint to have unique stations per flow velocity model
author Tom Gottfried <tom@intevation.de>
date Mon, 15 Apr 2013 16:04:22 +0200
parents 88cbe798cbab
children
comparison
equal deleted inserted replaced
5708:e8469247dc6b 5709:e89d922df8ae
205 q NUMERIC NOT NULL, 205 q NUMERIC NOT NULL,
206 total_channel NUMERIC NOT NULL, 206 total_channel NUMERIC NOT NULL,
207 main_channel NUMERIC NOT NULL, 207 main_channel NUMERIC NOT NULL,
208 shear_stress NUMERIC NOT NULL, 208 shear_stress NUMERIC NOT NULL,
209 PRIMARY KEY(id), 209 PRIMARY KEY(id),
210 UNIQUE (station, flow_velocity_model_id),
210 CONSTRAINT fk_fvv_flow_velocity_model_id FOREIGN KEY (flow_velocity_model_id) REFERENCES flow_velocity_model(id) ON DELETE CASCADE 211 CONSTRAINT fk_fvv_flow_velocity_model_id FOREIGN KEY (flow_velocity_model_id) REFERENCES flow_velocity_model(id) ON DELETE CASCADE
211 ); 212 );
212 213
213 214
214 215

http://dive4elements.wald.intevation.org