changeset 7866:0c74b5f8de17

Precision and scale have to be set to represent integers with NUMBER; DOUBLE PRECISION is preferable for floating point (see issue1304).
author Tom Gottfried <tom@intevation.de>
date Tue, 13 May 2014 10:30:00 +0200
parents 8d4a4c645e61
children 03b28800d47b
files backend/doc/schema/oracle-minfo.sql
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/backend/doc/schema/oracle-minfo.sql	Thu May 08 15:26:32 2014 +0200
+++ b/backend/doc/schema/oracle-minfo.sql	Tue May 13 10:30:00 2014 +0200
@@ -150,11 +150,11 @@
 CREATE SEQUENCE POROSITY_ID_SEQ;
 
 CREATE TABLE porosity (
-    id               NUMBER NOT NULL,
-    river_id         NUMBER NOT NULL,
-    depth_id         NUMBER NOT NULL,
+    id               NUMBER(38,0) NOT NULL,
+    river_id         NUMBER(38,0) NOT NULL,
+    depth_id         NUMBER(38,0) NOT NULL,
     description      VARCHAR(256),
-    time_interval_id NUMBER NOT NULL,
+    time_interval_id NUMBER(38,0) NOT NULL,
     PRIMARY KEY(id),
     CONSTRAINT fk_p_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE,
     CONSTRAINT fk_p_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id),
@@ -165,11 +165,11 @@
 CREATE SEQUENCE POROSITY_VALUES_ID_SEQ;
 
 CREATE TABLE porosity_values (
-    id                  NUMBER NOT NULL,
-    porosity_id         NUMBER NOT NULL,
-    station             NUMBER NOT NULL,
-    shore_offset        NUMBER,
-    porosity            NUMBER NOT NULL,
+    id                  NUMBER(38,0) NOT NULL,
+    porosity_id         NUMBER(38,0) NOT NULL,
+    station             DOUBLE PRECISION NOT NULL,
+    shore_offset        DOUBLE PRECISION,
+    porosity            DOUBLE PRECISION NOT NULL,
     description         VARCHAR(256),
     PRIMARY KEY(id),
     CONSTRAINT fk_pv_porosity_id FOREIGN KEY(porosity_id) REFERENCES porosity(id) ON DELETE CASCADE

http://dive4elements.wald.intevation.org