base_resourcelog: add missing index (#66064)

This commit is contained in:
Pierre Ducroquet 2022-06-08 15:35:02 +02:00 committed by Thomas NOËL
parent a7781fdd52
commit 53d419627e
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 3.2.13 on 2022-06-08 13:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0029_auto_20210202_1627'),
]
operations = [
migrations.AddIndex(
model_name='resourcelog',
index=models.Index(fields=['appname', '-timestamp'], name='base_resour_appname_298cbc_idx'),
),
]

View File

@ -871,6 +871,9 @@ class ResourceLog(models.Model):
class Meta:
ordering = ('id',)
permissions = (('see_resourcelog', 'Can see resource logs'),)
indexes = [
models.Index(fields=['appname', '-timestamp']),
]
@property
def level(self):