Skip to content

Commit

Permalink
additional indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
keeganland committed May 11, 2021
1 parent 956596e commit 9bdd18c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dispatch/migrations/0107_auto_20210511_1354.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.1.8 on 2021-05-11 20:54

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dispatch', '0106_auto_20210511_1238'),
]

operations = [
migrations.AddIndex(
model_name='subsection',
index=models.Index(fields=['slug', 'section'], name='dispatch_su_slug_27e9d6_idx'),
),
]
17 changes: 17 additions & 0 deletions dispatch/migrations/0108_auto_20210511_1359.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.1.8 on 2021-05-11 20:59

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dispatch', '0107_auto_20210511_1354'),
]

operations = [
migrations.AddIndex(
model_name='article',
index=models.Index(fields=['subsection'], name='dispatch_ar_subsect_f813dd_idx'),
),
]
2 changes: 2 additions & 0 deletions dispatch/modules/content/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ class Meta:
models.Index(fields=['-published_at']),
models.Index(fields=['head', 'is_published']),
models.Index(fields=['section']),
models.Index(fields=['subsection']),
]

class Subsection(Model, AuthorMixin):
Expand Down Expand Up @@ -452,6 +453,7 @@ def get_absolute_url(self):
class Meta:
indexes = [
models.Index(fields=['slug']),
models.Index(fields=['slug','section']),
]

class Page(Publishable):
Expand Down

0 comments on commit 9bdd18c

Please sign in to comment.