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.

19 lines
459B

  1. defmodule Pleroma.Repo.Migrations.DropUserTrigramIndex do
  2. @moduledoc "Drops unused trigram index on `users` (FTS index is being used instead)"
  3. use Ecto.Migration
  4. def up do
  5. drop_if_exists(index(:users, [], name: :users_trigram_index))
  6. end
  7. def down do
  8. create_if_not_exists(
  9. index(:users, ["(trim(nickname || ' ' || coalesce(name, ''))) gist_trgm_ops"],
  10. name: :users_trigram_index,
  11. using: :gist
  12. )
  13. )
  14. end
  15. end