mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-26 01:50:34 +00:00
Add index for finding active (and local) users
This commit is contained in:
parent
0501ce39cd
commit
464a0298c6
2 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 3.2.25 on 2024-04-03 19:22
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("bookwyrm", "0202_user_bookwyrm_us_usernam_b2546d_idx"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddIndex(
|
||||
model_name="user",
|
||||
index=models.Index(
|
||||
fields=["is_active", "local"], name="bookwyrm_us_is_acti_972dc4_idx"
|
||||
),
|
||||
),
|
||||
]
|
|
@ -203,6 +203,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
|||
|
||||
indexes = [
|
||||
models.Index(fields=["username"]),
|
||||
models.Index(fields=["is_active", "local"]),
|
||||
]
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in a new issue