From: Alex Gleason Date: Tue, 28 Dec 2021 00:05:35 +0000 (-0600) Subject: Apps: add user_id index X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=fa35e24a5ec70ecd92e9e31d1e13da44b9e27b6d;p=akkoma Apps: add user_id index --- diff --git a/priv/repo/migrations/20210818023112_add_user_id_to_apps.exs b/priv/repo/migrations/20210818023112_add_user_id_to_apps.exs index 39e7fbef5..88a6bce00 100644 --- a/priv/repo/migrations/20210818023112_add_user_id_to_apps.exs +++ b/priv/repo/migrations/20210818023112_add_user_id_to_apps.exs @@ -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