From cf5d1302aa97c3a042421333f93d91b474266e51 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 3 Sep 2018 11:55:12 +0000 Subject: [PATCH] migrations: add is_moderator index for users table --- .../migrations/20180903114437_users_add_is_moderator_index.exs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 priv/repo/migrations/20180903114437_users_add_is_moderator_index.exs 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 index 000000000..ba6b90ea9 --- /dev/null +++ b/priv/repo/migrations/20180903114437_users_add_is_moderator_index.exs @@ -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