changeset 5159:074051942f92

merge
author Tom Gottfried <tom@intevation.de>
date Fri, 01 Mar 2013 13:33:03 +0100
parents a9658d43b621 (diff) 608c6acf74c8 (current diff)
children 0dae9e77c5da
files
diffstat 3 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle-spatial.sql	Fri Mar 01 13:29:55 2013 +0100
+++ b/flys-backend/doc/schema/oracle-spatial.sql	Fri Mar 01 13:33:03 2013 +0100
@@ -150,7 +150,7 @@
     border_break    NUMBER(1) DEFAULT 0 NOT NULL,
     resolution      VARCHAR(16),
     description     VARCHAR(256),
-    path            VARCHAR(256) NOT NULL
+    path            VARCHAR(256) NOT NULL UNIQUE
 );
 CREATE OR REPLACE TRIGGER dem_trigger BEFORE INSERT ON dem FOR each ROW
     BEGIN
--- a/flys-backend/doc/schema/oracle.sql	Fri Mar 01 13:29:55 2013 +0100
+++ b/flys-backend/doc/schema/oracle.sql	Fri Mar 01 13:33:03 2013 +0100
@@ -238,7 +238,7 @@
 
 CREATE TABLE ranges (
     id                  NUMBER(38,0) NOT NULL,
-    a                   NUMBER(38,10),
+    a                   NUMBER(38,10) NOT NULL,
     b                   NUMBER(38,10),
     river_id            NUMBER(38,0),
     PRIMARY KEY         (id)
@@ -261,11 +261,12 @@
 -- TIME_INTERVALS
 CREATE SEQUENCE TIME_INTERVALS_ID_SEQ;
 
-CREATE TABLE time_intervals (
+CREATE TABLE time_intervals_ (
     id                  NUMBER(38,0) NOT NULL, 
-    start_time          TIMESTAMP,
+    start_time          TIMESTAMP NOT NULL,
     stop_time           TIMESTAMP,
-    PRIMARY KEY         (id)
+    PRIMARY KEY         (id),
+    CHECK (start_time <= stop_time)
 );
 
 
--- a/flys-backend/doc/schema/postgresql-spatial.sql	Fri Mar 01 13:29:55 2013 +0100
+++ b/flys-backend/doc/schema/postgresql-spatial.sql	Fri Mar 01 13:33:03 2013 +0100
@@ -107,7 +107,7 @@
     border_break    BOOLEAN NOT NULL DEFAULT FALSE,
     resolution      VARCHAR(16),
     description     VARCHAR(256),
-    path            VARCHAR(256) NOT NULL
+    path            VARCHAR(256) NOT NULL UNIQUE
 );
 ALTER TABLE dem ALTER COLUMN id SET DEFAULT NEXTVAL('DEM_ID_SEQ');
 

http://dive4elements.wald.intevation.org