Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
433B

  1. defmodule Pleroma.Repo.Migrations.AddFTSIndexToObjects do
  2. use Ecto.Migration
  3. def change do
  4. drop_if_exists(
  5. index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"],
  6. using: :gin,
  7. name: :activities_fts
  8. )
  9. )
  10. create_if_not_exists(
  11. index(:objects, ["(to_tsvector('english', data->>'content'))"],
  12. using: :gin,
  13. name: :objects_fts
  14. )
  15. )
  16. end
  17. end