mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-14 08:23:59 +00:00
16 lines
599 B
MySQL
16 lines
599 B
MySQL
|
create table person_block (
|
||
|
id serial primary key,
|
||
|
person_id int references person on update cascade on delete cascade not null,
|
||
|
target_id int references person on update cascade on delete cascade not null,
|
||
|
published timestamp not null default now(),
|
||
|
unique(person_id, target_id)
|
||
|
);
|
||
|
|
||
|
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,
|
||
|
published timestamp not null default now(),
|
||
|
unique(person_id, community_id)
|
||
|
);
|