Don't need to set time limit here, already did in setup(), memory_limit still needs...
[mediawiki.git] / maintenance / testRunner.ora.sql
blob6e3e1b7c1b3e1e77ac3be25a562efa4730c382f6
1 --
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.
6 --
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,
16   tr_date DATE,
17   tr_mw_version BLOB,
18   tr_php_version BLOB,
19   tr_db_version BLOB,
20   tr_uname BLOB,
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
25 ON &mw_prefix.testrun
26 BEGIN
27   SELECT testrun_tr_id_seq.NEXTVAL into :NEW.tr_id FROM dual;
28 END; 
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),
33   ti_success NUMBER(1)
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);