1 -- create user follower table with two references to persons
2 create table person_follower (
4 person_id int references person on update cascade on delete cascade not null,
5 follower_id int references person on update cascade on delete cascade not null,
6 published timestamp not null default now(),
7 pending boolean not null,
8 unique (follower_id, person_id)
11 update community_follower set pending = false where pending is null;
12 alter table community_follower alter column pending set not null;