Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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