Mercurial > dive4elements > river
changeset 8411:b8c6cb36607e
SCHEMA CHANGE: There is no boolean data type in oracle, and therefore it's no good idea to use it in postgresql.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 15 Oct 2014 14:58:46 +0200 |
parents | 0ac11615a2a3 |
children | 17db08570637 |
files | backend/doc/schema/oracle.sql backend/doc/schema/postgresql.sql |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)) );
--- 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.