]> Untitled Git - lemmy.git/blob - migrations/2022-09-07-114618_pm-reports/up.sql
Sanitize html (#3708)
[lemmy.git] / migrations / 2022-09-07-114618_pm-reports / up.sql
1 create table private_message_report (
2   id            serial    primary key,
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,
6   reason        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
12 );