diff flys-backend/doc/schema/oracle-spatial.sql @ 5210:908848b74d7e

SCHEME CHANGE: dgm now uses time intervals and ranges
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 08 Mar 2013 18:15:48 +0100
parents 31fd42400c84
children b46df0609276
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle-spatial.sql	Fri Mar 08 17:44:12 2013 +0100
+++ b/flys-backend/doc/schema/oracle-spatial.sql	Fri Mar 08 18:15:48 2013 +0100
@@ -130,27 +130,22 @@
 --CREATE INDEX floodplain_spatial_idx ON floodplain(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POLYGON');
 
 
--- TODO: Test-Me. Fix Importer-Skript.
--- NOTE: It's not a spatial schema!
 -- Geodaesie/Hoehenmodelle/*
 CREATE SEQUENCE DEM_ID_SEQ;
 CREATE TABLE dem (
-    ID NUMBER PRIMARY KEY NOT NULL,
-    river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
-    -- XXX Should we use the ranges table instead?
-    name            VARCHAR(64),
-    lower           NUMBER(19,5),
-    upper           NUMBER(19,5),
-    year_from       VARCHAR(32),
-    year_to         VARCHAR(32),
-    projection      VARCHAR(32),
-    elevation_state VARCHAR(32),
-    srid            NUMBER NOT NULL,
-    format          VARCHAR(32),
-    border_break    NUMBER(1) DEFAULT 0 NOT NULL,
-    resolution      VARCHAR(16),
-    description     VARCHAR(256),
-    path            VARCHAR(256) NOT NULL UNIQUE
+    ID               NUMBER PRIMARY KEY NOT NULL,
+    river_id         NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
+    name             VARCHAR(64),
+    range_id         NUMBER(38) REFERENCES ranges(id);
+    time_interval_id NUMBER(38) REFERENCES time_intervals(id),
+    projection       VARCHAR(32),
+    elevation_state  VARCHAR(32),
+    srid             NUMBER NOT NULL,
+    format           VARCHAR(32),
+    border_break     NUMBER(1) DEFAULT 0 NOT NULL,
+    resolution       VARCHAR(16),
+    description      VARCHAR(256),
+    path             VARCHAR(256) NOT NULL UNIQUE
 );
 CREATE OR REPLACE TRIGGER dem_trigger BEFORE INSERT ON dem FOR each ROW
     BEGIN

http://dive4elements.wald.intevation.org