0006_redo_partial_indexes.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.11.1 on 2017-05-21 17:52
  3. from __future__ import unicode_literals
  4. import django.contrib.postgres.indexes
  5. from django.contrib.postgres.operations import BtreeGinExtension
  6. from django.db import migrations
  7. import misago.core.pgutils
  8. class Migration(migrations.Migration):
  9. dependencies = [
  10. ('misago_threads', '0005_index_search_document'),
  11. ]
  12. operations = [
  13. migrations.AddIndex(
  14. model_name='post',
  15. index=misago.core.pgutils.PgPartialIndex(fields=['has_open_reports'], name='misago_thre_has_ope_479906_part', where={'has_open_reports': True}),
  16. ),
  17. migrations.AddIndex(
  18. model_name='post',
  19. index=misago.core.pgutils.PgPartialIndex(fields=['is_hidden'], name='misago_thre_is_hidd_85db69_part', where={'is_hidden': False}),
  20. ),
  21. migrations.AddIndex(
  22. model_name='thread',
  23. index=misago.core.pgutils.PgPartialIndex(fields=['weight'], name='misago_thre_weight_955884_part', where={'weight': 2}),
  24. ),
  25. migrations.AddIndex(
  26. model_name='thread',
  27. index=misago.core.pgutils.PgPartialIndex(fields=['weight'], name='misago_thre_weight_9e8f9c_part', where={'weight': 1}),
  28. ),
  29. migrations.AddIndex(
  30. model_name='thread',
  31. index=misago.core.pgutils.PgPartialIndex(fields=['weight'], name='misago_thre_weight_c7ef29_part', where={'weight': 0}),
  32. ),
  33. migrations.AddIndex(
  34. model_name='thread',
  35. index=misago.core.pgutils.PgPartialIndex(fields=['weight'], name='misago_thre_weight__4af9ee_part', where={'weight__lt': 2}),
  36. ),
  37. migrations.AddIndex(
  38. model_name='thread',
  39. index=misago.core.pgutils.PgPartialIndex(fields=['has_reported_posts'], name='misago_thre_has_rep_84acfa_part', where={'has_reported_posts': True}),
  40. ),
  41. migrations.AddIndex(
  42. model_name='thread',
  43. index=misago.core.pgutils.PgPartialIndex(fields=['has_unapproved_posts'], name='misago_thre_has_una_b0dbf5_part', where={'has_unapproved_posts': True}),
  44. ),
  45. migrations.AddIndex(
  46. model_name='thread',
  47. index=misago.core.pgutils.PgPartialIndex(fields=['is_hidden'], name='misago_thre_is_hidd_d2b96c_part', where={'is_hidden': False}),
  48. ),
  49. ]