Add index on subscribers
authorSadposter <hannah+pleroma@coffee-and-dreams.uk>
Fri, 5 Apr 2019 16:30:54 +0000 (17:30 +0100)
committerSadposter <hannah+pleroma@coffee-and-dreams.uk>
Fri, 5 Apr 2019 16:30:54 +0000 (17:30 +0100)
priv/repo/migrations/20190405160700_add_index_on_subscribers.exs [new file with mode: 0644]

diff --git a/priv/repo/migrations/20190405160700_add_index_on_subscribers.exs b/priv/repo/migrations/20190405160700_add_index_on_subscribers.exs
new file mode 100644 (file)
index 0000000..232f75c
--- /dev/null
@@ -0,0 +1,8 @@
+defmodule Pleroma.Repo.Migrations.AddIndexOnSubscribers do
+  use Ecto.Migration
+  
+  @disable_ddl_transaction true
+  def change do
+    create index(:users, ["(info->'subscribers')"], name: :users_subscribers_index, using: :gin, concurrently: true)
+  end
+end