lemmy/migrations/2023-07-05-000058_person-admin/up.sql
phiresky 922ee6a230
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>
2023-07-06 14:44:26 +02:00

2 lines
155 B
SQL

drop index if exists idx_person_admin;
create index idx_person_admin on person(admin) where admin; -- allow quickly finding all admins (PersonView::admins)