Skip to content

Commit

Permalink
Add index on created_at
Browse files Browse the repository at this point in the history
  • Loading branch information
aviupadhyayula committed Oct 15, 2024
1 parent 950269f commit ebe0bc9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.4 on 2024-10-15 23:50

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("clubs", "0118_alter_clubapprovalresponsetemplate_title"),
]

operations = [
migrations.AlterField(
model_name="clubapprovalresponsetemplate",
name="created_at",
field=models.DateTimeField(auto_now_add=True, db_index=True),
),
]
2 changes: 1 addition & 1 deletion backend/clubs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2009,7 +2009,7 @@ class ClubApprovalResponseTemplate(models.Model):
)
title = models.CharField(max_length=255, unique=True)
content = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)
created_at = models.DateTimeField(auto_now_add=True, db_index=True)
updated_at = models.DateTimeField(auto_now=True)

def __str__(self):
Expand Down

0 comments on commit ebe0bc9

Please sign in to comment.