Mercurial > dive4elements > river
changeset 5684:88cbe798cbab
Schema change: fixed constraints
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 12 Apr 2013 16:13:23 +0200 |
parents | 545a6ace9a19 |
children | 756df79274e1 |
files | flys-backend/doc/schema/oracle-minfo.sql flys-backend/doc/schema/oracle.sql flys-backend/doc/schema/postgresql-minfo.sql flys-backend/doc/schema/postgresql.sql |
diffstat | 4 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle-minfo.sql Fri Apr 12 15:08:14 2013 +0200 +++ b/flys-backend/doc/schema/oracle-minfo.sql Fri Apr 12 16:13:23 2013 +0200 @@ -331,5 +331,5 @@ cduan NUMBER(38,20), PRIMARY KEY (id), CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE, - CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) + CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) ON DELETE CASCADE );
--- a/flys-backend/doc/schema/oracle.sql Fri Apr 12 15:08:14 2013 +0200 +++ b/flys-backend/doc/schema/oracle.sql Fri Apr 12 16:13:23 2013 +0200 @@ -220,7 +220,7 @@ CREATE TABLE named_main_values ( id NUMBER(38,0) NOT NULL, - name VARCHAR2(255), + name VARCHAR2(256) NOT NULL UNIQUE, type_id NUMBER(38,0), PRIMARY KEY (id) );
--- a/flys-backend/doc/schema/postgresql-minfo.sql Fri Apr 12 15:08:14 2013 +0200 +++ b/flys-backend/doc/schema/postgresql-minfo.sql Fri Apr 12 16:13:23 2013 +0200 @@ -331,6 +331,6 @@ cduan NUMERIC, PRIMARY KEY (id), CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) ON DELETE CASCADE, - CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) + CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id) ON DELETE CASCADE ); COMMIT;
--- a/flys-backend/doc/schema/postgresql.sql Fri Apr 12 15:08:14 2013 +0200 +++ b/flys-backend/doc/schema/postgresql.sql Fri Apr 12 16:13:23 2013 +0200 @@ -111,8 +111,7 @@ CREATE TABLE named_main_values ( id int PRIMARY KEY NOT NULL, name VARCHAR(256) NOT NULL UNIQUE, - type_id int NOT NULL REFERENCES main_value_types(id), - UNIQUE (name, type_id) + type_id int NOT NULL REFERENCES main_value_types(id) ); -- Table for time intervals