Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

20190204200237_add_correct_dm_index.exs 776B

123456789101112131415161718192021222324252627282930
  1. defmodule Pleroma.Repo.Migrations.AddCorrectDMIndex do
  2. use Ecto.Migration
  3. @disable_ddl_transaction true
  4. def up do
  5. drop_if_exists(
  6. index(:activities, ["activity_visibility(actor, recipients, data)"],
  7. name: :activities_visibility_index
  8. )
  9. )
  10. create(
  11. index(:activities, ["activity_visibility(actor, recipients, data)", "id DESC NULLS LAST"],
  12. name: :activities_visibility_index,
  13. concurrently: true,
  14. where: "data->>'type' = 'Create'"
  15. )
  16. )
  17. end
  18. def down do
  19. drop_if_exists(
  20. index(:activities, ["activity_visibility(actor, recipients, data)", "id DESC"],
  21. name: :activities_visibility_index,
  22. concurrently: true,
  23. where: "data->>'type' = 'Create'"
  24. )
  25. )
  26. end
  27. end