summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-12-28 10:14:58 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-12-28 10:14:58 +0000
commitb122b6ffa318af30586f9da0532135959804a6a0 (patch)
treeec01ebec0ec8877af9e4876c3627e0756677e081 /priv
parente4f1d8f48c85b8a388d6c3945db157de5ce588c5 (diff)
parentd0c2479710b40a88b3a74c85c9ed9e72e9a2bfaf (diff)
Merge branch 'features/hashtag-column' into 'develop'
Insert text representation of hashtags into object["hashtags"] See merge request pleroma/pleroma!2824
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20200731165800_add_hashtags_index_to_objects.exs11
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