[Dive4elements-commits] [PATCH] Schema change: allow SECTIE and STROVOER (alias SOBEK) to be NULL, rename kinds
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 17 19:30:13 CEST 2013
# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1366219810 -7200
# Node ID b5553164fabf32313882f69dec21b775445956f7
# Parent 09465f534c86f73c6daa1639b6f02ff6533e8594
Schema change: allow SECTIE and STROVOER (alias SOBEK) to be NULL, rename kinds
diff -r 09465f534c86 -r b5553164fabf flys-backend/doc/schema/oracle-spatial.sql
--- a/flys-backend/doc/schema/oracle-spatial.sql Wed Apr 17 19:01:44 2013 +0200
+++ b/flys-backend/doc/schema/oracle-spatial.sql Wed Apr 17 19:30:10 2013 +0200
@@ -237,23 +237,23 @@
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,
name VARCHAR(64) NOT NULL
);
-INSERT INTO sectie_kinds (id, name) VALUES (0, 'SECTIE Unbekannt');
-INSERT INTO sectie_kinds (id, name) VALUES (1, 'Flussschlauch');
-INSERT INTO sectie_kinds (id, name) VALUES (2, 'Uferbank');
-INSERT INTO sectie_kinds (id, name) VALUES (3, 'Überflutungsbereich');
+INSERT INTO sectie_kinds (id, name) VALUES (0, 'nicht berücksichtigt');
+INSERT INTO sectie_kinds (id, name) VALUES (1, 'Hauptgerinne');
+INSERT INTO sectie_kinds (id, name) VALUES (2, 'Uferbereich');
+INSERT INTO sectie_kinds (id, name) VALUES (3, 'Vorland');
CREATE TABLE sobek_kinds (
id NUMBER PRIMARY KEY NOT NULL,
name VARCHAR(64) NOT NULL
);
-INSERT INTO sobek_kinds (id, name) VALUES (0, 'SOBEK Unbekannt');
-INSERT INTO sobek_kinds (id, name) VALUES (1, 'Stromführend');
-INSERT INTO sobek_kinds (id, name) VALUES (2, 'Stromspeichernd');
+INSERT INTO sobek_kinds (id, name) VALUES (0, 'nicht berücksichtigt');
+INSERT INTO sobek_kinds (id, name) VALUES (1, 'durchströmt');
+INSERT INTO sobek_kinds (id, name) VALUES (2, 'nicht durchströmt');
CREATE TABLE boundary_kinds (
id NUMBER PRIMARY KEY NOT NULL,
@@ -338,8 +338,8 @@
river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
name VARCHAR(255),
kind NUMBER(38) DEFAULT 0 NOT NULL REFERENCES boundary_kinds(id),
- sectie NUMBER(38) DEFAULT 0 NOT NULL REFERENCES sectie_kinds(id),
- sobek NUMBER(38) DEFAULT 0 NOT NULL REFERENCES sobek_kinds(id),
+ sectie NUMBER(38) REFERENCES sectie_kinds(id),
+ sobek NUMBER(38) REFERENCES sobek_kinds(id),
path VARCHAR(256),
id NUMBER PRIMARY KEY NOT NULL
);
@@ -357,8 +357,8 @@
river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
name VARCHAR(255),
kind NUMBER(38) DEFAULT 0 NOT NULL REFERENCES boundary_kinds(id),
- sectie NUMBER(38) DEFAULT 0 NOT NULL REFERENCES sectie_kinds(id),
- sobek NUMBER(38) DEFAULT 0 NOT NULL REFERENCES sobek_kinds(id),
+ sectie NUMBER(38) REFERENCES sectie_kinds(id),
+ sobek NUMBER(38) REFERENCES sobek_kinds(id),
path VARCHAR(256),
id NUMBER PRIMARY KEY NOT NULL
);
diff -r 09465f534c86 -r b5553164fabf flys-backend/doc/schema/postgresql-spatial.sql
--- a/flys-backend/doc/schema/postgresql-spatial.sql Wed Apr 17 19:01:44 2013 +0200
+++ b/flys-backend/doc/schema/postgresql-spatial.sql Wed Apr 17 19:30:10 2013 +0200
@@ -250,18 +250,18 @@
id int PRIMARY KEY NOT NULL,
name VARCHAR(64) NOT NULL
);
-INSERT INTO sectie_kinds (id, name) VALUES (0, 'SECTIE Unbekannt');
-INSERT INTO sectie_kinds (id, name) VALUES (1, 'Flussschlauch');
-INSERT INTO sectie_kinds (id, name) VALUES (2, 'Uferbank');
-INSERT INTO sectie_kinds (id, name) VALUES (3, 'Überflutungsbereich');
+INSERT INTO sectie_kinds (id, name) VALUES (0, 'nicht berücksichtigt');
+INSERT INTO sectie_kinds (id, name) VALUES (1, 'Hauptgerinne');
+INSERT INTO sectie_kinds (id, name) VALUES (2, 'Uferbereich');
+INSERT INTO sectie_kinds (id, name) VALUES (3, 'Vorland');
CREATE TABLE sobek_kinds (
id int PRIMARY KEY NOT NULL,
name VARCHAR(64) NOT NULL
);
-INSERT INTO sobek_kinds (id, name) VALUES (0, 'SOBEK Unbekannt');
-INSERT INTO sobek_kinds (id, name) VALUES (1, 'Stromführend');
-INSERT INTO sobek_kinds (id, name) VALUES (2, 'Stromspeichernd');
+INSERT INTO sobek_kinds (id, name) VALUES (0, 'nicht berücksichtigt');
+INSERT INTO sobek_kinds (id, name) VALUES (1, 'durchströmt');
+INSERT INTO sobek_kinds (id, name) VALUES (2, 'nicht durchströmt');
CREATE TABLE boundary_kinds (
id int PRIMARY KEY NOT NULL,
@@ -278,8 +278,8 @@
river_id int REFERENCES rivers(id) ON DELETE CASCADE,
name VARCHAR(255),
kind int REFERENCES boundary_kinds(id) NOT NULL DEFAULT 0,
- sectie int REFERENCES sectie_kinds(id) NOT NULL DEFAULT 0,
- sobek int REFERENCES sobek_kinds(id) NOT NULL DEFAULT 0,
+ sectie int REFERENCES sectie_kinds(id),
+ sobek int REFERENCES sobek_kinds(id),
path VARCHAR(256)
);
SELECT AddGeometryColumn('hydr_boundaries','geom',31467,'MULTILINESTRING',3);
@@ -292,8 +292,8 @@
river_id int REFERENCES rivers(id) ON DELETE CASCADE,
name VARCHAR(255),
kind int REFERENCES boundary_kinds(id) NOT NULL DEFAULT 0,
- sectie int REFERENCES sectie_kinds(id) NOT NULL DEFAULT 0,
- sobek int REFERENCES sobek_kinds(id) NOT NULL DEFAULT 0,
+ sectie int REFERENCES sectie_kinds(id),
+ sobek int REFERENCES sobek_kinds(id),
path VARCHAR(256)
);
SELECT AddGeometryColumn('hydr_boundaries_poly','geom',31467,'MULTIPOLYGON',3);
More information about the Dive4elements-commits
mailing list