summaryrefslogtreecommitdiff
path: root/priv/repo/migrations
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-10-30 19:25:32 +0100
committerRoger Braun <roger@rogerbraun.net>2017-10-30 19:25:32 +0100
commitf23edd2d6b67ee30ccd16b7a27d9e07a9f928574 (patch)
tree7f8516e81ff6d1aa188904dab044fec01488bc70 /priv/repo/migrations
parent261ec824515c1de6d93ad1c4ca7d3cf73faa58a4 (diff)
parent502cb38cd69f9f8c15a0ee597584364f9d36bdf1 (diff)
downloadpleroma-f23edd2d6b67ee30ccd16b7a27d9e07a9f928574.tar.gz
pleroma-f23edd2d6b67ee30ccd16b7a27d9e07a9f928574.zip
Merge branch 'feld/pleroma-feld-mastodon-usersearch' into develop
Diffstat (limited to 'priv/repo/migrations')
-rw-r--r--priv/repo/migrations/20171024090137_drop_object_index.exs7
-rw-r--r--priv/repo/migrations/20171024121413_add_object_actor_index.exs9
2 files changed, 16 insertions, 0 deletions
diff --git a/priv/repo/migrations/20171024090137_drop_object_index.exs b/priv/repo/migrations/20171024090137_drop_object_index.exs
new file mode 100644
index 000000000..29b4c9333
--- /dev/null
+++ b/priv/repo/migrations/20171024090137_drop_object_index.exs
@@ -0,0 +1,7 @@
+defmodule Pleroma.Repo.Migrations.DropObjectIndex do
+ use Ecto.Migration
+
+ def change do
+ drop_if_exists index(:objects, [:data], using: :gin)
+ end
+end
diff --git a/priv/repo/migrations/20171024121413_add_object_actor_index.exs b/priv/repo/migrations/20171024121413_add_object_actor_index.exs
new file mode 100644
index 000000000..344c9c825
--- /dev/null
+++ b/priv/repo/migrations/20171024121413_add_object_actor_index.exs
@@ -0,0 +1,9 @@
+defmodule Pleroma.Repo.Migrations.AddObjectActorIndex do
+ use Ecto.Migration
+
+ @disable_ddl_transaction true
+
+ def change do
+ create index(:objects, ["(data->>'actor')", "(data->>'type')"], concurrently: true, name: :objects_actor_type)
+ end
+end