lemmy/migrations/2022-01-04-034553_add_hidden_column/up.sql
dayinjing 7f9b55e793
Hide community v2 (#2055)
* Initial working of hiding communities and adding a db entry for mod log

* Return mod log for hidden communities

* Clean up hidding communities PR

* use lower case like other migration files

* Formatting fix

* pass in admin id to list, make match logic the same in post_view as community_view. Dont force non null for reason

* Clean PR review stuff

* Change person_id to mod_person_id on hide community table

* Make bools optional, add a space for formating

Co-authored-by: Thor Odinson <odinson@asgard.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-02-18 02:30:47 +00:00

13 lines
398 B
SQL

alter table community add column hidden boolean default false;
create table mod_hide_community
(
id serial primary key,
community_id int references community on update cascade on delete cascade not null,
mod_person_id int references person on update cascade on delete cascade not null,
when_ timestamp not null default now(),
reason text,
hidden boolean default false
);