Mercurial > dive4elements > river
changeset 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 | e8469247dc6b |
children | 06f3a36a83b6 |
files | flys-backend/doc/schema/oracle-minfo.sql flys-backend/doc/schema/postgresql-minfo.sql |
diffstat | 2 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle-minfo.sql Mon Apr 15 15:48:58 2013 +0200 +++ b/flys-backend/doc/schema/oracle-minfo.sql Mon Apr 15 16:04:22 2013 +0200 @@ -207,6 +207,7 @@ main_channel NUMBER(38,3) NOT NULL, shear_stress NUMBER(38,3) NOT NULL, PRIMARY KEY(id), + UNIQUE (station, flow_velocity_model_id), CONSTRAINT fk_fvv_flow_velocity_model_id FOREIGN KEY (flow_velocity_model_id) REFERENCES flow_velocity_model(id) ON DELETE CASCADE );
--- a/flys-backend/doc/schema/postgresql-minfo.sql Mon Apr 15 15:48:58 2013 +0200 +++ b/flys-backend/doc/schema/postgresql-minfo.sql Mon Apr 15 16:04:22 2013 +0200 @@ -207,6 +207,7 @@ main_channel NUMERIC NOT NULL, shear_stress NUMERIC NOT NULL, PRIMARY KEY(id), + UNIQUE (station, flow_velocity_model_id), CONSTRAINT fk_fvv_flow_velocity_model_id FOREIGN KEY (flow_velocity_model_id) REFERENCES flow_velocity_model(id) ON DELETE CASCADE );