You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemmy/migrations/2021-10-01-141650_create_ad.../up.sql

32 lines
1014 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()
);