Apps: add user_id index
authorAlex Gleason <alex@alexgleason.me>
Tue, 28 Dec 2021 00:05:35 +0000 (18:05 -0600)
committerAlex Gleason <alex@alexgleason.me>
Tue, 28 Dec 2021 00:05:35 +0000 (18:05 -0600)
priv/repo/migrations/20210818023112_add_user_id_to_apps.exs

index 39e7fbef5262b5d346553001be42ef6a740a8e59..88a6bce00ada951d9a796b1685fe2cbfe513713a 100644 (file)
@@ -5,5 +5,7 @@ defmodule Pleroma.Repo.Migrations.AddUserIdToApps do
     alter table(:apps) do
       add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
     end
+
+    create_if_not_exists(index(:apps, [:user_id]))
   end
 end