comparison backend/doc/schema/postgresql.sql @ 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 a67bd7744827
children 3531f0cee5e1
comparison
equal deleted inserted replaced
8410:0ac11615a2a3 8411:b8c6cb36607e
13 CREATE TABLE rivers ( 13 CREATE TABLE rivers (
14 id int PRIMARY KEY NOT NULL, 14 id int PRIMARY KEY NOT NULL,
15 model_uuid CHAR(36) UNIQUE, 15 model_uuid CHAR(36) UNIQUE,
16 official_number int8, 16 official_number int8,
17 name VARCHAR(256) NOT NULL UNIQUE, 17 name VARCHAR(256) NOT NULL UNIQUE,
18 km_up BOOLEAN NOT NULL DEFAULT true, 18 km_up int DEFAULT 0 NOT NULL,
19 wst_unit_id int NOT NULL REFERENCES units(id) 19 wst_unit_id int NOT NULL REFERENCES units(id),
20 CHECK(km_up IN(0,1))
20 ); 21 );
21 22
22 -- Bruecke, Haefen, etc. 23 -- Bruecke, Haefen, etc.
23 CREATE SEQUENCE ATTRIBUTES_ID_SEQ; 24 CREATE SEQUENCE ATTRIBUTES_ID_SEQ;
24 25

http://dive4elements.wald.intevation.org