0006_redo_partial_indexes.py 2.3 KB

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