Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql-spatial.sql @ 2365:60532f75396b
Adapted 'lines' relation and made lines queryable for a given river.
flys-backend/trunk@3219 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 10 Nov 2011 13:35:31 +0000 |
parents | a8f408fdf58c |
children | 918877ee70e7 |
comparison
equal
deleted
inserted
replaced
2364:efe19e669092 | 2365:60532f75396b |
---|---|
38 -- Geodaesie/Linien/rohre-und-spreen | 38 -- Geodaesie/Linien/rohre-und-spreen |
39 CREATE SEQUENCE LINES_ID_SEQ; | 39 CREATE SEQUENCE LINES_ID_SEQ; |
40 CREATE TABLE lines ( | 40 CREATE TABLE lines ( |
41 id int PRIMARY KEY NOT NULL, | 41 id int PRIMARY KEY NOT NULL, |
42 river_id int REFERENCES rivers(id), | 42 river_id int REFERENCES rivers(id), |
43 kind int NOT NULL DEFAULT 0, | 43 kind VARCHAR(16) NOT NULL, |
44 z NUMERIC DEFAULT 0 | 44 z NUMERIC DEFAULT 0 |
45 ); | 45 ); |
46 SELECT AddGeometryColumn('lines', 'geom', 31466, 'LINESTRING', 4); | 46 SELECT AddGeometryColumn('lines', 'geom', 31466, 'LINESTRING', 4); |
47 ALTER TABLE lines ALTER COLUMN id SET DEFAULT NEXTVAL('LINES_ID_SEQ'); | 47 ALTER TABLE lines ALTER COLUMN id SET DEFAULT NEXTVAL('LINES_ID_SEQ'); |
48 -- 'kind': | 48 -- 'kind': |