diff options
| author | Tobias McNulty <tobias@caktusgroup.com> | 2024-04-10 09:41:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-10 09:41:24 -0400 |
| commit | 5a28ba14fe4825344a63d78eb44ce4ce767176a4 (patch) | |
| tree | ccb14ba7cd1b50fe9dea93cea5ebbf94e76a4edc /aggregator | |
| parent | bfcd7e72657be1f5329d7a4c7c831555e8de1763 (diff) | |
Added index on aggregator_feeditem (date_modified DESC) (#1517)
Diffstat (limited to 'aggregator')
| -rw-r--r-- | aggregator/migrations/0005_feeditem_add_index_date_modified.py | 17 | ||||
| -rw-r--r-- | aggregator/models.py | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/aggregator/migrations/0005_feeditem_add_index_date_modified.py b/aggregator/migrations/0005_feeditem_add_index_date_modified.py new file mode 100644 index 00000000..7466a517 --- /dev/null +++ b/aggregator/migrations/0005_feeditem_add_index_date_modified.py @@ -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'), + ), + ] diff --git a/aggregator/models.py b/aggregator/models.py index 6a5fc4fe..8ccc220a 100644 --- a/aggregator/models.py +++ b/aggregator/models.py @@ -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 |
