comparison flys-backend/doc/schema/oracle.sql @ 5321:6dd354e7abfc

SCHEMA CHANGE: removed bad triggers and foreign keys from schema
author Tom Gottfried <tom@intevation.de>
date Fri, 15 Mar 2013 16:43:00 +0100
parents eaa630838705
children 88cbe798cbab
comparison
equal deleted inserted replaced
5320:a7778435a4af 5321:6dd354e7abfc
244 a NUMBER(38,10) NOT NULL, 244 a NUMBER(38,10) NOT NULL,
245 b NUMBER(38,10), 245 b NUMBER(38,10),
246 river_id NUMBER(38,0), 246 river_id NUMBER(38,0),
247 PRIMARY KEY (id) 247 PRIMARY KEY (id)
248 ); 248 );
249 CREATE OR REPLACE TRIGGER ranges_trigger BEFORE INSERT ON ranges FOR EACH ROW 249
250 BEGIN
251 SELECT RANGES_ID_SEQ.nextval INTO :new.id FROM dual;
252 END;
253 /
254 250
255 251
256 -- RIVERS 252 -- RIVERS
257 CREATE SEQUENCE RIVERS_ID_SEQ; 253 CREATE SEQUENCE RIVERS_ID_SEQ;
258 254
274 start_time TIMESTAMP NOT NULL, 270 start_time TIMESTAMP NOT NULL,
275 stop_time TIMESTAMP, 271 stop_time TIMESTAMP,
276 PRIMARY KEY (id), 272 PRIMARY KEY (id),
277 CHECK (start_time <= stop_time) 273 CHECK (start_time <= stop_time)
278 ); 274 );
279 CREATE OR REPLACE TRIGGER time_intervals_trigger BEFORE INSERT ON time_intervals FOR EACH ROW
280 BEGIN
281 SELECT TIME_INTERVALS_ID_SEQ.nextval INTO :new.id FROM dual;
282 END;
283 /
284 275
285 276
286 --- UNITS 277 --- UNITS
287 CREATE SEQUENCE UNITS_ID_SEQ; 278 CREATE SEQUENCE UNITS_ID_SEQ;
288 279

http://dive4elements.wald.intevation.org