comparison flys-backend/doc/schema/oracle.sql @ 5158:a9658d43b621

added missing constraints in schema (mostly for Oracle)
author Tom Gottfried <tom@intevation.de>
date Fri, 01 Mar 2013 13:28:45 +0100
parents 5c07ec3e9e25
children 8667f629d238
comparison
equal deleted inserted replaced
5155:6b19902baf31 5158:a9658d43b621
236 --- RANGES 236 --- RANGES
237 CREATE SEQUENCE RANGES_ID_SEQ; 237 CREATE SEQUENCE RANGES_ID_SEQ;
238 238
239 CREATE TABLE ranges ( 239 CREATE TABLE ranges (
240 id NUMBER(38,0) NOT NULL, 240 id NUMBER(38,0) NOT NULL,
241 a NUMBER(38,10), 241 a NUMBER(38,10) NOT NULL,
242 b NUMBER(38,10), 242 b NUMBER(38,10),
243 river_id NUMBER(38,0), 243 river_id NUMBER(38,0),
244 PRIMARY KEY (id) 244 PRIMARY KEY (id)
245 ); 245 );
246 246
259 259
260 260
261 -- TIME_INTERVALS 261 -- TIME_INTERVALS
262 CREATE SEQUENCE TIME_INTERVALS_ID_SEQ; 262 CREATE SEQUENCE TIME_INTERVALS_ID_SEQ;
263 263
264 CREATE TABLE time_intervals ( 264 CREATE TABLE time_intervals_ (
265 id NUMBER(38,0) NOT NULL, 265 id NUMBER(38,0) NOT NULL,
266 start_time TIMESTAMP, 266 start_time TIMESTAMP NOT NULL,
267 stop_time TIMESTAMP, 267 stop_time TIMESTAMP,
268 PRIMARY KEY (id) 268 PRIMARY KEY (id),
269 CHECK (start_time <= stop_time)
269 ); 270 );
270 271
271 272
272 --- UNITS 273 --- UNITS
273 CREATE SEQUENCE UNITS_ID_SEQ; 274 CREATE SEQUENCE UNITS_ID_SEQ;

http://dive4elements.wald.intevation.org