Skip to content

Commit

Permalink
Added index on aggregator_feeditem (date_modified DESC)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasmcnulty committed Apr 10, 2024
1 parent bfcd7e7 commit 60eff5e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.25 on 2024-04-10 06:48

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('aggregator', '0004_add_local_django_community'),
]

operations = [
migrations.AddIndex(
model_name='feeditem',
index=models.Index(fields=['-date_modified'], name='aggregator__date_mo_d6dfa1_idx'),
),
]
1 change: 1 addition & 0 deletions aggregator/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class FeedItem(models.Model):

class Meta:
ordering = ("-date_modified",)
indexes = (models.Index(fields=["-date_modified"]),)

def __str__(self):
return self.title
Expand Down

0 comments on commit 60eff5e

Please sign in to comment.