mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-09-09 16:08:49 -06:00
![Nutomic](/assets/img/avatar_default.png)
* Implement federated user following (fixes #752) * rewrite send_activity_in_community and add docs, remove default for column pending * improve migration * replace null values in db migration
13 lines
538 B
SQL
13 lines
538 B
SQL
-- create user follower table with two references to persons
|
|
create table person_follower (
|
|
id serial primary key,
|
|
person_id int references person on update cascade on delete cascade not null,
|
|
follower_id int references person on update cascade on delete cascade not null,
|
|
published timestamp not null default now(),
|
|
pending boolean not null,
|
|
unique (follower_id, person_id)
|
|
);
|
|
|
|
update community_follower set pending = false where pending is null;
|
|
alter table community_follower alter column pending set not null;
|