From: Alex Gleason Date: Fri, 26 Nov 2021 21:32:01 +0000 (-0600) Subject: v2 Suggestions: add index on is_suggested column X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=da06e1a17fe45407cd82f83223dc68b8920e1fe8;p=akkoma v2 Suggestions: add index on is_suggested column --- diff --git a/priv/repo/migrations/20211126191138_add_suggestions.exs b/priv/repo/migrations/20211126191138_add_suggestions.exs index 5ad604e9d..7cc67d8ef 100644 --- a/priv/repo/migrations/20211126191138_add_suggestions.exs +++ b/priv/repo/migrations/20211126191138_add_suggestions.exs @@ -5,5 +5,7 @@ defmodule Pleroma.Repo.Migrations.AddSuggestions do alter table(:users) do add(:is_suggested, :boolean, default: false, null: false) end + + create_if_not_exists(index(:users, [:is_suggested])) end end