mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-14 20:10:59 +00:00
Merge pull request #1851 from gasman/fix/db-index-page-first-published-at
Add db index on Page.first_published_at
This commit is contained in:
commit
5b0a696bb6
2 changed files with 20 additions and 1 deletions
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('wagtailcore', '0019_verbose_names_cleanup'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='page',
|
||||
name='first_published_at',
|
||||
field=models.DateTimeField(editable=False, null=True, verbose_name='First published at', db_index=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -239,7 +239,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
|||
|
||||
locked = models.BooleanField(verbose_name=_('Locked'), default=False, editable=False)
|
||||
|
||||
first_published_at = models.DateTimeField(verbose_name=_('First published at'), null=True, editable=False)
|
||||
first_published_at = models.DateTimeField(verbose_name=_('First published at'), null=True, editable=False, db_index=True)
|
||||
latest_revision_created_at = models.DateTimeField(verbose_name=_('Latest revision created at'), null=True, editable=False)
|
||||
|
||||
search_fields = (
|
||||
|
|
|
|||
Loading…
Reference in a new issue