[Dive4elements-commits] [PATCH 1 of 2] SCHEMA CHANGE: removed obsolete table 'lines' from spatial schema (now 'hws_lines')
Wald Commits
scm-commit at wald.intevation.org
Tue Feb 19 10:01:26 CET 2013
# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1361264277 -3600
# Branch dami
# Node ID eecd1ebba128a036269f1297c7dab85aa1b2031e
# Parent ee52faa6b7ac0b635a327dd685d7030c637f8f69
SCHEMA CHANGE: removed obsolete table 'lines' from spatial schema (now 'hws_lines')
diff -r ee52faa6b7ac -r eecd1ebba128 flys-backend/doc/schema/oracle-spatial.sql
--- a/flys-backend/doc/schema/oracle-spatial.sql Tue Feb 19 09:44:38 2013 +0100
+++ b/flys-backend/doc/schema/oracle-spatial.sql Tue Feb 19 09:57:57 2013 +0100
@@ -59,33 +59,6 @@
--CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
--- TODO: TestMe. Fix Importer-Script. Fix oracle_spatial_idx.sql script.
--- Geodaesie/Linien/rohre-und-speeren
-CREATE SEQUENCE LINES_ID_SEQ;
-CREATE TABLE lines (
- OGR_FID NUMBER(38),
- GEOM MDSYS.SDO_GEOMETRY,
- river_id NUMBER(38),
- kind VARCHAR2(16) NOT NULL,
- z NUMBER(38,12) DEFAULT 0,
- name VARCHAR(64),
- path VARCHAR(256),
- ID NUMBER PRIMARY KEY NOT NULL
-);
-INSERT INTO USER_SDO_GEOM_METADATA VALUES ('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 OR REPLACE TRIGGER lines_trigger BEFORE INSERT ON lines FOR each ROW
- BEGIN
- SELECT LINES_ID_SEQ.nextval INTO :new.id FROM dual;
- END;
-/
--- NOTE: Should lines should be 3D.
--- TODO: Test index.
---CREATE INDEX lines_idx ON lines(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
--- 'kind':
--- 0: ROHR1
--- 1: DAMM
-
-
-- Geodaesie/Bauwerke/Wehre.shp
CREATE SEQUENCE BUILDINGS_ID_SEQ;
CREATE TABLE buildings(
diff -r ee52faa6b7ac -r eecd1ebba128 flys-backend/doc/schema/oracle-spatial_idx.sql
--- a/flys-backend/doc/schema/oracle-spatial_idx.sql Tue Feb 19 09:44:38 2013 +0100
+++ b/flys-backend/doc/schema/oracle-spatial_idx.sql Tue Feb 19 09:57:57 2013 +0100
@@ -6,4 +6,4 @@
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 lines_idx ON lines(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
+
diff -r ee52faa6b7ac -r eecd1ebba128 flys-backend/doc/schema/postgresql-spatial.sql
--- a/flys-backend/doc/schema/postgresql-spatial.sql Tue Feb 19 09:44:38 2013 +0100
+++ b/flys-backend/doc/schema/postgresql-spatial.sql Tue Feb 19 09:57:57 2013 +0100
@@ -41,23 +41,6 @@
ALTER TABLE cross_section_tracks ALTER COLUMN id SET DEFAULT NEXTVAL('CROSS_SECTION_TRACKS_ID_SEQ');
--- Geodaesie/Linien/rohre-und-spreen
-CREATE SEQUENCE LINES_ID_SEQ;
-CREATE TABLE lines (
- id int PRIMARY KEY NOT NULL,
- river_id int REFERENCES rivers(id) ON DELETE CASCADE,
- kind VARCHAR(16) NOT NULL,
- z FLOAT8 DEFAULT 0,
- name VARCHAR(64),
- path VARCHAR(256)
-);
-SELECT AddGeometryColumn('lines', 'geom', 31467, 'LINESTRING', 3);
-ALTER TABLE lines ALTER COLUMN id SET DEFAULT NEXTVAL('LINES_ID_SEQ');
--- 'kind':
--- 0: ROHR1
--- 1: DAMM
-
-
-- Geodaesie/Bauwerke/Wehre.shp
CREATE SEQUENCE BUILDINGS_ID_SEQ;
CREATE TABLE buildings (
More information about the Dive4elements-commits
mailing list