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-08-04-223559_create_us.../up.sql

16 lines
599 B
SQL

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)
);