summaryrefslogtreecommitdiff
path: root/priv/repo/migrations
diff options
context:
space:
mode:
authorRoger Braun <rbraun@Bobble.local>2017-10-24 14:16:17 +0200
committerRoger Braun <rbraun@Bobble.local>2017-10-24 14:16:17 +0200
commit9af560083fcc513a7b3c41b06f4ed307c50a7529 (patch)
tree2dcc9e3e845ef55ce1e29d261420aa4970b3d2d0 /priv/repo/migrations
parent29c261e75ba10eac0cda8ec19d158d84c96f6572 (diff)
downloadpleroma-9af560083fcc513a7b3c41b06f4ed307c50a7529.tar.gz
pleroma-9af560083fcc513a7b3c41b06f4ed307c50a7529.zip
Use more efficient user note count update query.
Diffstat (limited to 'priv/repo/migrations')
-rw-r--r--priv/repo/migrations/20171024121413_add_object_actor_index.exs9
1 files changed, 9 insertions, 0 deletions
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