diff flys-backend/doc/schema/postgresql.sql @ 1195:2b4de678e29a

Removed braindead points3d table flys-backend/trunk@2295 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 06 Jul 2011 15:35:38 +0000
parents 5f8444df19e4
children 4e1b475a8cba
line wrap: on
line diff
--- a/flys-backend/doc/schema/postgresql.sql	Wed Jul 06 12:56:59 2011 +0000
+++ b/flys-backend/doc/schema/postgresql.sql	Wed Jul 06 15:35:38 2011 +0000
@@ -272,25 +272,15 @@
     UNIQUE (km, river_id)            -- XXX: Maybe too hard?
 );
 
--- TODO: Use a geometry column in cross_section_points
-
-CREATE SEQUENCE POINTS3D_ID_SEQ;
-
-CREATE TABLE points3d (
-    id int     PRIMARY KEY NOT NULL,
-    x  NUMERIC NOT NULL,
-    y  NUMERIC NOT NULL,
-    z  NUMERIC NOT NULL
-);
-
 CREATE SEQUENCE CROSS_SECTION_POINTS_ID_SEQ;
 
 CREATE TABLE cross_section_points (
     id               int PRIMARY KEY NOT NULL,
     cross_section_id int NOT NULL REFERENCES cross_sections(id),
-    point3d_id       int NOT NULL REFERENCES points3d(id),
     col_pos          int NOT NULL,
-    UNIQUE (cross_section_id, point3d_id, col_pos),
+    x                NUMERIC NOT NULL,
+    y                NUMERIC NOT NULL
+    UNIQUE (cross_section_id, x),
     UNIQUE (cross_section_id, col_pos)
 );
 

http://dive4elements.wald.intevation.org