2 -- Optional tables for parserTests recording mode
3 -- With --record option, success data will be saved to these tables,
4 -- and comparisons of what's changed from the previous run will be
5 -- displayed at the end of each run.
7 -- defines must comply with ^define\s*([^\s=]*)\s*=\s?'\{\$([^\}]*)\}';
8 define mw_prefix
='{$wgDBprefix}';
10 DROP TABLE &mw_prefix.testitem
CASCADE CONSTRAINTS;
11 DROP TABLE &mw_prefix.testrun
CASCADE CONSTRAINTS;
13 CREATE SEQUENCE testrun_tr_id_seq
;
14 CREATE TABLE &mw_prefix.
testrun (
15 tr_id
NUMBER NOT NULL,
22 ALTER TABLE &mw_prefix.testrun
ADD CONSTRAINT &mw_prefix.testrun_pk
PRIMARY KEY (tr_id
);
23 CREATE OR REPLACE TRIGGER &mw_prefix.testrun_bir
24 BEFORE UPDATE FOR EACH ROW
27 SELECT testrun_tr_id_seq.NEXTVAL
into :NEW.tr_id
FROM dual
;
30 CREATE TABLE /*$wgDBprefix*/testitem (
31 ti_run
NUMBER NOT NULL REFERENCES &mw_prefix.
testrun (tr_id
) ON DELETE CASCADE,
32 ti_name
VARCHAR22(255),
35 CREATE UNIQUE INDEX &mw_prefix.testitem_u01
ON &mw_prefix.
testitem (ti_run
, ti_name
);
36 CREATE UNIQUE INDEX &mw_prefix.testitem_u01
ON &mw_prefix.
testitem (ti_run
, ti_success
);