Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql.sql @ 5684:88cbe798cbab
Schema change: fixed constraints
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 12 Apr 2013 16:13:23 +0200 |
parents | 6dd354e7abfc |
children | 153456f84602 |
comparison
equal
deleted
inserted
replaced
5683:545a6ace9a19 | 5684:88cbe798cbab |
---|---|
109 CREATE SEQUENCE NAMED_MAIN_VALUES_ID_SEQ; | 109 CREATE SEQUENCE NAMED_MAIN_VALUES_ID_SEQ; |
110 | 110 |
111 CREATE TABLE named_main_values ( | 111 CREATE TABLE named_main_values ( |
112 id int PRIMARY KEY NOT NULL, | 112 id int PRIMARY KEY NOT NULL, |
113 name VARCHAR(256) NOT NULL UNIQUE, | 113 name VARCHAR(256) NOT NULL UNIQUE, |
114 type_id int NOT NULL REFERENCES main_value_types(id), | 114 type_id int NOT NULL REFERENCES main_value_types(id) |
115 UNIQUE (name, type_id) | |
116 ); | 115 ); |
117 | 116 |
118 -- Table for time intervals | 117 -- Table for time intervals |
119 CREATE SEQUENCE TIME_INTERVALS_ID_SEQ; | 118 CREATE SEQUENCE TIME_INTERVALS_ID_SEQ; |
120 | 119 |