[PATCH 1 of 2] SCHEMA CHANGE: There is no boolean data type in oracle, and therefore it's no good idea to use it in postgresql
Wald Commits
scm-commit at wald.intevation.org
Wed Oct 15 19:20:31 CEST 2014
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1413377926 -7200
# Node ID b8c6cb36607eebae9b18d607de685ade344f074a
# Parent 0ac11615a2a382011fca216eeab6e1c4536abab2
SCHEMA CHANGE: There is no boolean data type in oracle, and therefore it's no good idea to use it in postgresql.
diff -r 0ac11615a2a3 -r b8c6cb36607e backend/doc/schema/oracle.sql
--- a/backend/doc/schema/oracle.sql Tue Oct 14 19:21:33 2014 +0200
+++ b/backend/doc/schema/oracle.sql Wed Oct 15 14:58:46 2014 +0200
@@ -264,10 +264,11 @@
id NUMBER(38,0) NOT NULL,
model_uuid CHAR(36 CHAR) UNIQUE,
official_number NUMBER(38,0),
- km_up NUMBER(38,0) DEFAULT 0 NOT NULL,
+ km_up int DEFAULT 0 NOT NULL,
name VARCHAR2(255) NOT NULL UNIQUE,
wst_unit_id NUMBER(38,0) NOT NULL,
- PRIMARY KEY (id)
+ PRIMARY KEY (id),
+ CHECK(km_up IN(0,1))
);
diff -r 0ac11615a2a3 -r b8c6cb36607e backend/doc/schema/postgresql.sql
--- a/backend/doc/schema/postgresql.sql Tue Oct 14 19:21:33 2014 +0200
+++ b/backend/doc/schema/postgresql.sql Wed Oct 15 14:58:46 2014 +0200
@@ -15,8 +15,9 @@
model_uuid CHAR(36) UNIQUE,
official_number int8,
name VARCHAR(256) NOT NULL UNIQUE,
- km_up BOOLEAN NOT NULL DEFAULT true,
- wst_unit_id int NOT NULL REFERENCES units(id)
+ km_up int DEFAULT 0 NOT NULL,
+ wst_unit_id int NOT NULL REFERENCES units(id),
+ CHECK(km_up IN(0,1))
);
-- Bruecke, Haefen, etc.
More information about the Dive4Elements-commits
mailing list