Alpha-ordering community follows. Fixes #2062 (#2079)

This commit is contained in:
Dessalines 2022-02-01 15:00:54 -05:00 committed by GitHub
parent 2ac6e1a463
commit 6b1894faf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

@ -28,6 +28,7 @@ impl CommunityFollowerView {
Person::safe_columns_tuple(), Person::safe_columns_tuple(),
)) ))
.filter(community_follower::community_id.eq(community_id)) .filter(community_follower::community_id.eq(community_id))
.order_by(community::title)
.load::<CommunityFollowerViewTuple>(conn)?; .load::<CommunityFollowerViewTuple>(conn)?;
Ok(Self::from_tuple_to_vec(res)) Ok(Self::from_tuple_to_vec(res))
@ -42,6 +43,7 @@ impl CommunityFollowerView {
Person::safe_columns_tuple(), Person::safe_columns_tuple(),
)) ))
.filter(community_follower::person_id.eq(person_id)) .filter(community_follower::person_id.eq(person_id))
.order_by(community::title)
.load::<CommunityFollowerViewTuple>(conn)?; .load::<CommunityFollowerViewTuple>(conn)?;
Ok(Self::from_tuple_to_vec(res)) Ok(Self::from_tuple_to_vec(res))

View file

@ -0,0 +1 @@
drop index idx_community_title;

View file

@ -0,0 +1 @@
create index idx_community_title on community(title);