]> Untitled Git - lemmy.git/blob - migrations/2022-09-07-114618_pm-reports/up.sql
Dont use sha hash for password reset token (fixes #3491) (#3795)
[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 );
13