]> Untitled Git - lemmy.git/blob - migrations/2021-08-04-223559_create_user_community_block/up.sql
Add controversial ranking (#3205)
[lemmy.git] / migrations / 2021-08-04-223559_create_user_community_block / up.sql
1 create table person_block (
2   id serial primary key,
3   person_id int references person on update cascade on delete cascade not null,
4   target_id int references person on update cascade on delete cascade not null,
5   published timestamp not null default now(),
6   unique(person_id, target_id)
7 );
8
9 create table community_block (
10   id serial primary key,
11   person_id int references person on update cascade on delete cascade not null,
12   community_id int references community on update cascade on delete cascade not null,
13   published timestamp not null default now(),
14   unique(person_id, community_id)
15 );