2021-05-09 11:32:46 +00:00
|
|
|
create table person_block (
|
|
|
|
id serial primary key,
|
|
|
|
person_id int references person on update cascade on delete cascade not null,
|
2021-08-13 16:36:33 +00:00
|
|
|
target_id int references person on update cascade on delete cascade not null,
|
2021-05-10 01:59:41 +00:00
|
|
|
published timestamp not null default now(),
|
2021-08-13 16:36:33 +00:00
|
|
|
unique(person_id, target_id)
|
2021-05-09 11:32:46 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
create table community_block (
|
|
|
|
id serial primary key,
|
|
|
|
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,
|
2021-05-10 01:59:41 +00:00
|
|
|
published timestamp not null default now(),
|
|
|
|
unique(person_id, community_id)
|
2021-05-09 11:32:46 +00:00
|
|
|
);
|