v2 Suggestions: add index on is_suggested column
authorAlex Gleason <alex@alexgleason.me>
Fri, 26 Nov 2021 21:32:01 +0000 (15:32 -0600)
committerAlex Gleason <alex@alexgleason.me>
Fri, 26 Nov 2021 21:32:01 +0000 (15:32 -0600)
priv/repo/migrations/20211126191138_add_suggestions.exs

index 5ad604e9da35e9bc7b787f3bc066c4c62a00ac41..7cc67d8ef2c54d9035e107cb2d90babdb487ce92 100644 (file)
@@ -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