Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql-spatial.sql @ 5391:e65fee5ea98a
Rename station to km to be in line with the rest
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 25 Mar 2013 10:12:42 +0100 |
parents | 2da74705c29d |
children | 8b29a94ebdd8 |
comparison
equal
deleted
inserted
replaced
5390:d449b502602b | 5391:e65fee5ea98a |
---|---|
68 -- Geodaesie/Bauwerke | 68 -- Geodaesie/Bauwerke |
69 CREATE SEQUENCE BUILDINGS_ID_SEQ; | 69 CREATE SEQUENCE BUILDINGS_ID_SEQ; |
70 CREATE TABLE buildings ( | 70 CREATE TABLE buildings ( |
71 id int PRIMARY KEY NOT NULL, | 71 id int PRIMARY KEY NOT NULL, |
72 river_id int REFERENCES rivers(id) ON DELETE CASCADE, | 72 river_id int REFERENCES rivers(id) ON DELETE CASCADE, |
73 description VARCHAR(256) -- Name taken from attributes, | 73 description VARCHAR(256), -- Name taken from attributes, |
74 name VARCHAR(256), -- The layername | 74 name VARCHAR(256), -- The layername |
75 station FLOAT8, | 75 km FLOAT8, |
76 kind_id int REFERENCES building_kinds(id) NOT NULL DEFAULT 0, | 76 kind_id int REFERENCES building_kinds(id) NOT NULL DEFAULT 0, |
77 path VARCHAR(256) | 77 path VARCHAR(256) |
78 ); | 78 ); |
79 SELECT AddGeometryColumn('buildings', 'geom', 31467, 'LINESTRING', 2); | 79 SELECT AddGeometryColumn('buildings', 'geom', 31467, 'LINESTRING', 2); |
80 ALTER TABLE buildings ALTER COLUMN id SET DEFAULT NEXTVAL('BUILDINGS_ID_SEQ'); | 80 ALTER TABLE buildings ALTER COLUMN id SET DEFAULT NEXTVAL('BUILDINGS_ID_SEQ'); |