[Dive4elements-commits] [PATCH 5 of 5] Fix some oracle syntax problems and move indicies to _idx.sql

Wald Commits scm-commit at wald.intevation.org
Wed Feb 20 10:47:16 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1361353444 -3600
# Branch dami
# Node ID 57a845da72bdd0b67e6ba5a7ee506d21668fe3fa
# Parent  2837b11cdb13077479fcca8eee7631c6211866cf
Fix some oracle syntax problems and move indicies to _idx.sql

diff -r 2837b11cdb13 -r 57a845da72bd flys-backend/doc/schema/oracle-spatial.sql
--- a/flys-backend/doc/schema/oracle-spatial.sql	Wed Feb 20 10:43:00 2013 +0100
+++ b/flys-backend/doc/schema/oracle-spatial.sql	Wed Feb 20 10:44:04 2013 +0100
@@ -1,4 +1,4 @@
-WHENEVER SQLERROR EXIT SQL.ERRORCODE ROLLBACK;
+WHENEVER SQLERROR EXIT;
 -- Geodaesie/Flussachse+km/achse
 CREATE SEQUENCE RIVER_AXES_ID_SEQ;
 CREATE TABLE river_axes(
@@ -200,13 +200,11 @@
     description VARCHAR(256)
 );
 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hws_lines', '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);
-CREATE INDEX hws_lines_spatial_idx ON hws_lines(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
-
 CREATE OR REPLACE TRIGGER hws_lines_trigger BEFORE INSERT ON hws_lines FOR each ROW
     BEGIN
         SELECT HWS_LINES_ID_SEQ.nextval INTO :new.id FROM dual;
     END;
-
+/
 -- HWS Points lookup tables
 CREATE TABLE sectie_kinds (
     id NUMBER PRIMARY KEY NOT NULL,
@@ -234,7 +232,6 @@
 INSERT INTO boundary_kinds (id, name) VALUES (2, 'Land');
 INSERT INTO boundary_kinds (id, name) VALUES (3, 'Sonstige');
 
-
 -- HWS Points
 CREATE SEQUENCE HWS_POINTS_ID_SEQ;
 CREATE TABLE hws_points (
@@ -261,13 +258,12 @@
 );
 
 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hws_points', '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);
-CREATE INDEX hws_lines_spatial_idx ON hws_pints(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');
 
-CREATE OR REPLACE TRIGGER hws_lines_trigger BEFORE INSERT ON hws_lines FOR each ROW
+CREATE OR REPLACE TRIGGER hws_points_trigger BEFORE INSERT ON hws_points FOR each ROW
     BEGIN
-        SELECT HWS_LINES_ID_SEQ.nextval INTO :new.id FROM dual;
+        SELECT HWS_POINTS_ID_SEQ.nextval INTO :new.id FROM dual;
     END;
-
+/
 
 --Hydrologie/UeSG
 CREATE SEQUENCE FLOODMAPS_ID_SEQ;
@@ -289,9 +285,7 @@
     BEGIN
         SELECT FLOODMAPS_ID_SEQ.nextval INTO :new.id FROM dual;
     END;
-
-CREATE INDEX floodmaps_spatial_idx ON floodmaps(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=MULTIPOLYGON');
-
+/
 
 --Hydrologie/Hydr.Grenzen/Linien
 CREATE SEQUENCE HYDR_BOUNDARIES_ID_SEQ;
@@ -309,8 +303,7 @@
     BEGIN
         SELECT HYDR_BOUNDARIES_ID_SEQ.nextval INTO :new.id FROM dual;
     END;
-
-CREATE INDEX hydr_boundaries_idx ON hydr_boundaries(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
+/
 
 CREATE SEQUENCE HYDR_BOUNDARIES_POLY_ID_SEQ;
 CREATE TABLE hydr_boundaries_poly (
@@ -327,9 +320,7 @@
     BEGIN
         SELECT HYDR_BOUNDARIES_POLY_ID_SEQ.nextval INTO :new.id FROM dual;
     END;
-
-CREATE INDEX hydr_boundaries_poly_idx ON hydr_boundaries_poly(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=MULTIPOLYGON');
-
+/
 
 -- Hydrologie/Streckendaten/
 CREATE SEQUENCE GAUGE_LOCATION_ID_SEQ;
@@ -346,5 +337,4 @@
     BEGIN
         SELECT GAUGE_LOCATION_ID_SEQ.nextval INTO :new.id FROM dual;
     END;
-
-CREATE INDEX gauge_location_idx ON gauge_location(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');
+/
diff -r 2837b11cdb13 -r 57a845da72bd flys-backend/doc/schema/oracle-spatial_idx.sql
--- a/flys-backend/doc/schema/oracle-spatial_idx.sql	Wed Feb 20 10:43:00 2013 +0100
+++ b/flys-backend/doc/schema/oracle-spatial_idx.sql	Wed Feb 20 10:44:04 2013 +0100
@@ -3,6 +3,11 @@
 CREATE INDEX fixpoints_spatial_idx ON fixpoints(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');
 CREATE INDEX river_axes_spatial_idx ON river_axes(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
 CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
-CREATE INDEX hws_spatial_idx ON hws(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
 CREATE INDEX floodplain_spatial_idx ON floodplain(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POLYGON');
+CREATE INDEX hydr_boundaries_idx ON hydr_boundaries(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
+CREATE INDEX hws_points_spatial_idx ON hws_points(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');
+CREATE INDEX hws_lines_spatial_idx ON hws_lines(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
+CREATE INDEX floodmaps_spatial_idx ON floodmaps(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=MULTIPOLYGON');
+CREATE INDEX gauge_location_idx ON gauge_location(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');
+CREATE INDEX hydr_boundaries_poly_idx ON hydr_boundaries_poly(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=MULTIPOLYGON');
 


More information about the Dive4elements-commits mailing list