Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql.sql @ 5297:4f3cc1aebcc0
trigger sequence of range IDs in DB as it is not used by hibernate only anymore
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 14 Mar 2013 13:32:02 +0100 |
parents | 2919cdc4e858 |
children | eaa630838705 |
comparison
equal
deleted
inserted
replaced
5296:55122db34cd0 | 5297:4f3cc1aebcc0 |
---|---|
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 -- Lage 'links', 'rechts', etc. | 42 -- Lage 'links', 'rechts', etc. |
41 CREATE SEQUENCE POSITIONS_ID_SEQ; | 43 CREATE SEQUENCE POSITIONS_ID_SEQ; |
42 | 44 |
43 CREATE TABLE positions ( | 45 CREATE TABLE positions ( |