3 alter table community add column creator_id int references person on update cascade on delete cascade;
6 create index idx_community_creator on community (creator_id);
8 -- Add the data, selecting the highest mod
10 set creator_id = sub.person_id
16 community_moderator cm
19 where id = sub.community_id;
22 alter table community alter column creator_id set not null;