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 -- This file is for the Postgres version of the tables
10 -- Note: "if exists" will not work on older versions of Postgres
11 DROP TABLE IF EXISTS testitem
;
12 DROP TABLE IF EXISTS testrun
;
13 DROP SEQUENCE IF EXISTS testrun_id_seq
;
15 CREATE SEQUENCE testrun_id_seq
;
16 CREATE TABLE testrun (
17 tr_id
INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('testrun_id_seq'),
25 CREATE TABLE testitem (
26 ti_run
INTEGER NOT NULL REFERENCES testrun(tr_id
) ON DELETE CASCADE,
27 ti_name
TEXT NOT NULL,
28 ti_success
SMALLINT NOT NULL
30 CREATE UNIQUE INDEX testitem_uniq
ON testitem(ti_run
, ti_name
);