1 create table private_message_report (
3 creator_id int references person on update cascade on delete cascade not null, -- user reporting comment
4 private_message_id int references private_message on update cascade on delete cascade not null, -- comment being reported
5 original_pm_text text not null,
7 resolved bool not null default false,
8 resolver_id int references person on update cascade on delete cascade, -- user resolving report
9 published timestamp not null default now(),
10 updated timestamp null,
11 unique(private_message_id, creator_id) -- users should only be able to report a pm once