1 --- SQL command to create the wrreport table, that is necessary to use the wrreport extension.
2 CREATE TABLE wrreport (
4 page_id integer, -- mediawiki page id the report is intended for
5 page_title varchar(255), -- mediawiki page title the report is intended for
6 date_report date, -- date, the report is intended for
7 date_entry timestamp with time zone DEFAULT now(), -- date where report was created
8 date_invalid timestamp with time zone DEFAULT (now() + '9 days'::interval), -- date were report becomes invalid
9 condition integer, -- condition from 1 (very good) to 5 (sledding not possible). NULL allowed.
10 description text, -- report description (wikitext)
11 author_name varchar(30), -- name of the person who created the report
12 author_ip inet, -- IP address of the person who created the report
13 author_userid integer, -- mediawiki user id of the person who created the report
14 author_username varchar(30), -- mediawiki user name of the person who created the report
15 delete_date timestamp with time zone, -- the report is considered deleted if this date is set
16 delete_person_name varchar(30), -- name of the person who deleted the report
17 delete_person_ip inet, -- IP address of the person who deleted the report
18 delete_person_userid integer, -- mediawiki user id of the person who deleted the report
19 delete_person_username varchar(30), -- mediawiki user name of the person who deleted the report
20 delete_reason_public text, -- reason for the deletion (wikitext)
21 delete_invisible boolean, -- do not mention that someone deleted this recored
22 CONSTRAINT condition_check CHECK (condition >= 1 AND condition <= 5)