Browse Source

Add index for faster event selects

Rafał Pitoń 7 years ago
parent
commit
657452666e
1 changed files with 20 additions and 0 deletions
  1. 20 0
      misago/threads/migrations/0009_auto_20180326_0010.py

+ 20 - 0
misago/threads/migrations/0009_auto_20180326_0010.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.9 on 2018-03-26 00:10
+from __future__ import unicode_literals
+
+from django.db import migrations
+import misago.core.pgutils
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('misago_threads', '0008_auto_20180310_2234'),
+    ]
+
+    operations = [
+        migrations.AddIndex(
+            model_name='post',
+            index=misago.core.pgutils.PgPartialIndex(fields=['is_event', 'event_type'], name='misago_thre_is_even_42bda7_part', where={'is_event': True}),
+        ),
+    ]