improve admin and mod check to not do seq scans and return unnecessary data (#3483)
authorphiresky <phireskyde+git@gmail.com>
Thu, 6 Jul 2023 12:44:26 +0000 (14:44 +0200)
committerGitHub <noreply@github.com>
Thu, 6 Jul 2023 12:44:26 +0000 (14:44 +0200)
commit922ee6a2305d08ba06f3f2343c563cb825e410fc
treebde7f12d91186e8678e1e23131784f9becb4c041
parent00f9f79a44887869dcdc3fe5bd1dabbbdc080cec
improve admin and mod check to not do seq scans and return unnecessary data (#3483)

* improve admin and mod check

* fix clippy

* move admin index to existing code

* Revert "move admin index to existing code"

This reverts commit d0c58d5f4021e1775d0c1d30d8df6c7df87557c4.

* third attempt at the migration

* fix formatting

* rebuild

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
crates/db_views_actor/src/community_moderator_view.rs
crates/db_views_actor/src/community_view.rs
crates/db_views_actor/src/person_view.rs
migrations/2023-07-04-153335_add_optimized_indexes/up.sql
migrations/2023-07-05-000058_person-admin/down.sql [new file with mode: 0644]
migrations/2023-07-05-000058_person-admin/up.sql [new file with mode: 0644]