0006_redo_partial_indexes.py 2.3 KB

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