File indexing completed on 2024-04-06 12:22:59
0001
0002 CREATE TABLE od_run_iov (
0003 iov_id NUMBER(10) NOT NULL,
0004 run_iov_id NUMBER(10) NOT NULL,
0005 subrun_num NUMBER(10) NOT NULL,
0006 subrun_start DATE NOT NULL,
0007 subrun_end DATE NOT NULL,
0008 db_timestamp TIMESTAMP DEFAULT SYSTIMESTAMP NOT NULL
0009 );
0010
0011 CREATE SEQUENCE od_run_iov_sq INCREMENT BY 1 START WITH 1;
0012
0013 ALTER TABLE od_run_iov ADD CONSTRAINT od_run_iov_pk PRIMARY KEY (iov_id);
0014 ALTER TABLE od_run_iov ADD CONSTRAINT od_run_iov_uk UNIQUE (run_iov_id, subrun_num);
0015 CREATE INDEX od_run_iov_ix ON od_run_iov (subrun_start, subrun_end);
0016 ALTER TABLE od_run_iov ADD CONSTRAINT od_run_iov_fk1 FOREIGN KEY (run_iov_id) REFERENCES run_iov (iov_id);
0017
0018
0019
0020
0021
0022 CREATE OR REPLACE TRIGGER od_run_iov_tg
0023 BEFORE INSERT ON od_run_iov
0024 REFERENCING NEW AS newiov
0025 FOR EACH ROW
0026 CALL update_odsubrun_iov_dates('od_run_iov', 'subrun_start', 'subrun_end', :newiov.subrun_start, :newiov.subrun_end, :newiov.run_iov_id)
0027 /
0028 SHOW ERRORS;
0029
0030
0031
0032
0033
0034
0035
0036