diff options
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20200731165800_add_hashtags_index_to_objects.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200731165800_add_hashtags_index_to_objects.exs b/priv/repo/migrations/20200731165800_add_hashtags_index_to_objects.exs new file mode 100644 index 000000000..b78682821 --- /dev/null +++ b/priv/repo/migrations/20200731165800_add_hashtags_index_to_objects.exs @@ -0,0 +1,11 @@ +defmodule Pleroma.Repo.Migrations.AddHashtagsIndexToObjects do + use Ecto.Migration + + def change do + drop_if_exists(index(:objects, ["(data->'tag')"], using: :gin, name: :objects_tags)) + + create_if_not_exists( + index(:objects, ["(data->'hashtags')"], using: :gin, name: :objects_hashtags) + ) + end +end |