[Dive4elements-commits] [PATCH 3 of 8] Add not null and default for hydr_boundary classifiers

Wald Commits scm-commit at wald.intevation.org
Thu Mar 28 17:15:23 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1364481094 -3600
# Node ID ef3517905e6e203a3cd9be28b9e5bf51f42b7498
# Parent  b91ffd97edc8d9873646ca20a7c62e5821dd2c1c
Add not null and default for hydr_boundary classifiers

diff -r b91ffd97edc8 -r ef3517905e6e flys-backend/doc/schema/oracle-spatial.sql
--- a/flys-backend/doc/schema/oracle-spatial.sql	Thu Mar 28 15:29:09 2013 +0100
+++ b/flys-backend/doc/schema/oracle-spatial.sql	Thu Mar 28 15:31:34 2013 +0100
@@ -337,9 +337,9 @@
     GEOM MDSYS.SDO_GEOMETRY,
     river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
     name VARCHAR(255),
-    kind   NUMBER(38) REFERENCES boundary_kinds(id),
-    sectie NUMBER(38) REFERENCES sectie_kinds(id),
-    sobek  NUMBER(38) REFERENCES sobek_kinds(id),
+    kind   NUMBER(38) REFERENCES boundary_kinds(id) NOT NULL DEFAULT 0,
+    sectie NUMBER(38) REFERENCES sectie_kinds(id) NOT NULL DEFAULT 0,
+    sobek  NUMBER(38) REFERENCES sobek_kinds(id) NOT NULL DEFAULT 0,
     path     VARCHAR(256),
     id NUMBER PRIMARY KEY NOT NULL
 );
@@ -356,9 +356,9 @@
     GEOM MDSYS.SDO_GEOMETRY,
     river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
     name VARCHAR(255),
-    kind   NUMBER(38) REFERENCES boundary_kinds(id),
-    sectie NUMBER(38) REFERENCES sectie_kinds(id),
-    sobek  NUMBER(38) REFERENCES sobek_kinds(id),
+    kind   NUMBER(38) REFERENCES boundary_kinds(id) NOT NULL DEFAULT 0,
+    sectie NUMBER(38) REFERENCES sectie_kinds(id) NOT NULL DEFAULT 0,
+    sobek  NUMBER(38) REFERENCES sobek_kinds(id) NOT NULL DEFAULT 0,
     path     VARCHAR(256),
     id NUMBER PRIMARY KEY NOT NULL
 );
diff -r b91ffd97edc8 -r ef3517905e6e flys-backend/doc/schema/postgresql-spatial.sql
--- a/flys-backend/doc/schema/postgresql-spatial.sql	Thu Mar 28 15:29:09 2013 +0100
+++ b/flys-backend/doc/schema/postgresql-spatial.sql	Thu Mar 28 15:31:34 2013 +0100
@@ -277,9 +277,9 @@
     id         int PRIMARY KEY NOT NULL,
     river_id   int REFERENCES rivers(id) ON DELETE CASCADE,
     name       VARCHAR(255),
-    kind       int REFERENCES boundary_kinds(id),
-    sectie     int REFERENCES sectie_kinds(id),
-    sobek      int REFERENCES sobek_kinds(id),
+    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,
     path       VARCHAR(256)
 );
 SELECT AddGeometryColumn('hydr_boundaries','geom',31467,'MULTILINESTRING',3);
@@ -291,9 +291,9 @@
     id         int PRIMARY KEY NOT NULL,
     river_id   int REFERENCES rivers(id) ON DELETE CASCADE,
     name       VARCHAR(255),
-    kind       int REFERENCES boundary_kinds(id),
-    sectie     int REFERENCES sectie_kinds(id),
-    sobek      int REFERENCES sobek_kinds(id),
+    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,
     path       VARCHAR(256)
 );
 SELECT AddGeometryColumn('hydr_boundaries_poly','geom',31467,'MULTIPOLYGON',3);


More information about the Dive4elements-commits mailing list