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 @@ def change 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