aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--priv/repo/migrations/20190522084924_add_object_index_on_name.exs7
1 files changed, 7 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190522084924_add_object_index_on_name.exs b/priv/repo/migrations/20190522084924_add_object_index_on_name.exs
new file mode 100644
index 000000000..886e8499e
--- /dev/null
+++ b/priv/repo/migrations/20190522084924_add_object_index_on_name.exs
@@ -0,0 +1,7 @@
+defmodule Pleroma.Repo.Migrations.AddObjectIndexOnName do
+ use Ecto.Migration
+
+ def change do
+ create(index(:objects, ["(data->'name')"], name: :objects_name_index, using: :gin))
+ end
+end