0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Add index on PageRevision approved_go_live_at field (#5725)

This commit is contained in:
Tom Usher 2019-12-03 09:08:14 +00:00 committed by Karl Hobley
parent 5cfa3b09e5
commit 8238a33888
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.7 on 2019-11-29 10:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0041_group_collection_permissions_verbose_name_plural'),
]
operations = [
migrations.AlterField(
model_name='pagerevision',
name='approved_go_live_at',
field=models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='approved go live at'),
),
]

View File

@ -1549,7 +1549,12 @@ class PageRevision(models.Model):
on_delete=models.SET_NULL
)
content_json = models.TextField(verbose_name=_('content JSON'))
approved_go_live_at = models.DateTimeField(verbose_name=_('approved go live at'), null=True, blank=True)
approved_go_live_at = models.DateTimeField(
verbose_name=_('approved go live at'),
null=True,
blank=True,
db_index=True
)
objects = models.Manager()
submitted_revisions = SubmittedRevisionsManager()