Mercurial > dive4elements > river
diff flys-backend/doc/schema/oracle-spatial.sql @ 5276:170f514a4f29
SCHEMA CHANGE: lookup table for floodmaps and source-field added, Importer adapted to new directory names
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 13 Mar 2013 18:39:28 +0100 |
parents | 8f71fe38977c |
children | 66d9389c80cb |
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle-spatial.sql Wed Mar 13 17:06:59 2013 +0100 +++ b/flys-backend/doc/schema/oracle-spatial.sql Wed Mar 13 18:39:28 2013 +0100 @@ -286,18 +286,29 @@ / --Hydrologie/UeSG +CREATE TABLE floodmap_kinds ( + id NUMBER PRIMARY KEY NOT NULL, + name varchar(64) NOT NULL +); +INSERT INTO floodmap_kinds VALUES (200, 'Messung'); +INSERT INTO floodmap_kinds VALUES (111, 'Berechnung-Aktuell-BfG'); +INSERT INTO floodmap_kinds VALUES (112, 'Berechnung-Aktuell-Bundesländer'); +INSERT INTO floodmap_kinds VALUES (121, 'Berechnung-Potenziell-BfG'); +INSERT INTO floodmap_kinds VALUES (122, 'Berechnung-Potenziell-Bundesländer'); + CREATE SEQUENCE FLOODMAPS_ID_SEQ; CREATE TABLE floodmaps ( OGR_FID NUMBER(38), GEOM MDSYS.SDO_GEOMETRY, river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, name VARCHAR(255), - kind NUMBER(38), + kind NUMBER NOT NULL REFERENCES floodmap_kinds(id), diff NUMBER(19,5), count NUMBER(38), area NUMBER(19,5), perimeter NUMBER(19,5), path VARCHAR(256), + source varchar(64), id NUMBER PRIMARY KEY NOT NULL ); INSERT INTO USER_SDO_GEOM_METADATA VALUES ('floodmaps', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',3282450,3912240,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5248260,6100130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);