mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 19:31:33 +00:00
4e12e25c59
* First pass at adding admin purge. #904 #1331 * Breaking out purge into 4 tables for the 4 purgeable types. * Using CommunitySafe instead in view * Fix db_schema features flags. * Attempting to pass API key. * Adding pictrs image purging - Added pictrs_config block, for API_KEY - Clear out image columns after purging * Remove the remove_images field from a few of the purge API calls. * Fix some suggestions by @nutomic. * Add separate pictrs reqwest client. * Update defaults.hjson Co-authored-by: Nutomic <me@nutomic.com>
31 lines
1,014 B
SQL
31 lines
1,014 B
SQL
-- Add the admin_purge tables
|
|
|
|
create table admin_purge_person (
|
|
id serial primary key,
|
|
admin_person_id int references person on update cascade on delete cascade not null,
|
|
reason text,
|
|
when_ timestamp not null default now()
|
|
);
|
|
|
|
create table admin_purge_community (
|
|
id serial primary key,
|
|
admin_person_id int references person on update cascade on delete cascade not null,
|
|
reason text,
|
|
when_ timestamp not null default now()
|
|
);
|
|
|
|
create table admin_purge_post (
|
|
id serial primary key,
|
|
admin_person_id int references person on update cascade on delete cascade not null,
|
|
community_id int references community on update cascade on delete cascade not null,
|
|
reason text,
|
|
when_ timestamp not null default now()
|
|
);
|
|
|
|
create table admin_purge_comment (
|
|
id serial primary key,
|
|
admin_person_id int references person on update cascade on delete cascade not null,
|
|
post_id int references post on update cascade on delete cascade not null,
|
|
reason text,
|
|
when_ timestamp not null default now()
|
|
);
|