--- SQL command to create the wrreport table, that is necessary to use the wrreport extension.
CREATE TABLE wrreport (
- id serial NOT NULL,
- page_id integer,
- page_title character varying(255),
- date_report date,
- date_entry timestamp with time zone DEFAULT now(),
- date_invalid timestamp with time zone DEFAULT (now() + '9 days'::interval),
- condition integer,
- description text,
- author_name character varying(30),
- author_ip inet,
- author_userid integer,
- author_username character varying(30),
- CONSTRAINT wrreport_pkey PRIMARY KEY (id),
+ id serial primary key,
+ page_id integer, -- mediawiki page id the report is intended for
+ page_title varchar(255), -- mediawiki page title the report is intended for
+ date_report date, -- date, the report is intended for
+ date_entry timestamp with time zone DEFAULT now(), -- date where report was created
+ date_invalid timestamp with time zone DEFAULT (now() + '9 days'::interval), -- date were report becomes invalid
+ condition integer, -- condition from 1 (very good) to 5 (sledding not possible). NULL allowed.
+ description text, -- report description (wikitext)
+ author_name varchar(30), -- name of the person who created the report
+ author_ip inet, -- IP address of the person who created the report
+ author_userid integer, -- mediawiki user id of the person who created the report
+ author_username varchar(30), -- mediawiki user name of the person who created the report
+ delete_date timestamp with time zone, -- the report is considered deleted if this date is set
+ delete_person_name varchar(30), -- name of the person who deleted the report
+ delete_person_ip inet, -- IP address of the person who deleted the report
+ delete_person_userid integer, -- mediawiki user id of the person who deleted the report
+ delete_person_username varchar(30), -- mediawiki user name of the person who deleted the report
+ delete_reason_public text, -- reason for the deletion (wikitext)
CONSTRAINT condition_check CHECK (condition >= 1 AND condition <= 5)
);