1 -- Add the admin_purge tables
2 CREATE TABLE admin_purge_person (
4 admin_person_id int REFERENCES person ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
6 when_ timestamp NOT NULL DEFAULT now()
9 CREATE TABLE admin_purge_community (
10 id serial PRIMARY KEY,
11 admin_person_id int REFERENCES person ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
13 when_ timestamp NOT NULL DEFAULT now()
16 CREATE TABLE admin_purge_post (
17 id serial PRIMARY KEY,
18 admin_person_id int REFERENCES person ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
19 community_id int REFERENCES community ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
21 when_ timestamp NOT NULL DEFAULT now()
24 CREATE TABLE admin_purge_comment (
25 id serial PRIMARY KEY,
26 admin_person_id int REFERENCES person ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
27 post_id int REFERENCES post ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
29 when_ timestamp NOT NULL DEFAULT now()