Skip to content

Commit

Permalink
Remove index for author.search_vector, which is never used
Browse files Browse the repository at this point in the history
  • Loading branch information
dato committed Nov 25, 2023
1 parent 0299f2e commit e4d6886
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
16 changes: 16 additions & 0 deletions bookwyrm/migrations/0190_book_search_updates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated by Django 3.2.20 on 2023-11-24 17:11

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0188_theme_loads"),
]

operations = [
migrations.RemoveIndex(
model_name="author",
name="bookwyrm_au_search__b050a8_gin",
),
]
6 changes: 0 additions & 6 deletions bookwyrm/models/author.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import re
from typing import Tuple, Any

from django.contrib.postgres.indexes import GinIndex
from django.db import models

from bookwyrm import activitypub
Expand Down Expand Up @@ -68,8 +67,3 @@ def get_remote_id(self):
return f"https://{DOMAIN}/author/{self.id}"

activity_serializer = activitypub.Author

class Meta:
"""sets up postgres GIN index field"""

indexes = (GinIndex(fields=["search_vector"]),)

0 comments on commit e4d6886

Please sign in to comment.