comparison flys-backend/doc/schema/oracle-spatial.sql @ 5513:ef3517905e6e

Add not null and default for hydr_boundary classifiers
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 28 Mar 2013 15:31:34 +0100
parents 1488227b97b7
children 4c4fed23693f
comparison
equal deleted inserted replaced
5512:b91ffd97edc8 5513:ef3517905e6e
335 CREATE TABLE hydr_boundaries ( 335 CREATE TABLE hydr_boundaries (
336 OGR_FID NUMBER(38), 336 OGR_FID NUMBER(38),
337 GEOM MDSYS.SDO_GEOMETRY, 337 GEOM MDSYS.SDO_GEOMETRY,
338 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, 338 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
339 name VARCHAR(255), 339 name VARCHAR(255),
340 kind NUMBER(38) REFERENCES boundary_kinds(id), 340 kind NUMBER(38) REFERENCES boundary_kinds(id) NOT NULL DEFAULT 0,
341 sectie NUMBER(38) REFERENCES sectie_kinds(id), 341 sectie NUMBER(38) REFERENCES sectie_kinds(id) NOT NULL DEFAULT 0,
342 sobek NUMBER(38) REFERENCES sobek_kinds(id), 342 sobek NUMBER(38) REFERENCES sobek_kinds(id) NOT NULL DEFAULT 0,
343 path VARCHAR(256), 343 path VARCHAR(256),
344 id NUMBER PRIMARY KEY NOT NULL 344 id NUMBER PRIMARY KEY NOT NULL
345 ); 345 );
346 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hydr_boundaries', '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); 346 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hydr_boundaries', '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);
347 CREATE OR REPLACE TRIGGER hydr_boundaries_trigger BEFORE INSERT ON hydr_boundaries FOR each ROW 347 CREATE OR REPLACE TRIGGER hydr_boundaries_trigger BEFORE INSERT ON hydr_boundaries FOR each ROW
354 CREATE TABLE hydr_boundaries_poly ( 354 CREATE TABLE hydr_boundaries_poly (
355 OGR_FID NUMBER(38), 355 OGR_FID NUMBER(38),
356 GEOM MDSYS.SDO_GEOMETRY, 356 GEOM MDSYS.SDO_GEOMETRY,
357 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, 357 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
358 name VARCHAR(255), 358 name VARCHAR(255),
359 kind NUMBER(38) REFERENCES boundary_kinds(id), 359 kind NUMBER(38) REFERENCES boundary_kinds(id) NOT NULL DEFAULT 0,
360 sectie NUMBER(38) REFERENCES sectie_kinds(id), 360 sectie NUMBER(38) REFERENCES sectie_kinds(id) NOT NULL DEFAULT 0,
361 sobek NUMBER(38) REFERENCES sobek_kinds(id), 361 sobek NUMBER(38) REFERENCES sobek_kinds(id) NOT NULL DEFAULT 0,
362 path VARCHAR(256), 362 path VARCHAR(256),
363 id NUMBER PRIMARY KEY NOT NULL 363 id NUMBER PRIMARY KEY NOT NULL
364 ); 364 );
365 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hydr_boundaries_poly', '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); 365 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hydr_boundaries_poly', '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);
366 CREATE OR REPLACE TRIGGER hydr_boundaries_poly_trigger BEFORE INSERT ON hydr_boundaries_poly FOR each ROW 366 CREATE OR REPLACE TRIGGER hydr_boundaries_poly_trigger BEFORE INSERT ON hydr_boundaries_poly FOR each ROW

http://dive4elements.wald.intevation.org