diff options
author | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2020-07-31 16:46:35 +0200 |
---|---|---|
committer | Haelwenn (lanodan) Monnier <contact@hacktivis.me> | 2020-12-22 05:15:34 +0100 |
commit | acb03d591bea1b20a715201f479f1ad7bf7bb67b (patch) | |
tree | 4ec82e0b7116e8accd8c344c5834781f65ac5990 /priv | |
parent | 8e1f32e71560c4b36ccbdc3ecf8de8386928305a (diff) |
Insert text representation of hashtags into object["hashtags"]
Includes a new mix task: pleroma.database fill_old_hashtags
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 |