Skip to content

Commit

Permalink
Add a database index on FeedEventDetail.event_datetime (#1304)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbertrand authored Jul 23, 2024
1 parent 7ae89e1 commit 581b186
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.14 on 2024-07-17 14:30

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("news_events", "0002_alter_feeditem_guid"),
]

operations = [
migrations.AlterField(
model_name="feedeventdetail",
name="event_datetime",
field=models.DateTimeField(db_index=True),
),
]
2 changes: 1 addition & 1 deletion news_events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class FeedEventDetail(TimestampedModel):
audience = ArrayField(models.CharField(max_length=255, blank=True))
location = ArrayField(models.CharField(max_length=255, blank=True))
event_type = ArrayField(models.CharField(max_length=255, blank=True))
event_datetime = models.DateTimeField()
event_datetime = models.DateTimeField(db_index=True)


class FeedNewsDetail(TimestampedModel):
Expand Down

0 comments on commit 581b186

Please sign in to comment.