migrations: add is_moderator index for users table
authorWilliam Pitcock <nenolod@dereferenced.org>
Mon, 3 Sep 2018 11:55:12 +0000 (11:55 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Mon, 3 Sep 2018 11:55:12 +0000 (11:55 +0000)
priv/repo/migrations/20180903114437_users_add_is_moderator_index.exs [new file with mode: 0644]

diff --git a/priv/repo/migrations/20180903114437_users_add_is_moderator_index.exs b/priv/repo/migrations/20180903114437_users_add_is_moderator_index.exs
new file mode 100644 (file)
index 0000000..ba6b90e
--- /dev/null
@@ -0,0 +1,7 @@
+defmodule Pleroma.Repo.Migrations.UsersAddIsModeratorIndex do
+  use Ecto.Migration
+
+  def change do
+    create index(:users, ["(info->'is_moderator')"], name: :users_is_moderator_index, using: :gin)
+  end
+end