Browse Source

Merge branch 'ecto_sql_update' into 'develop'

Dependencies: Update Ecto SQL.

See merge request pleroma/pleroma!1160
lambda 4 months ago
parent
commit
e5b34f5e05
5 changed files with 12 additions and 9 deletions
  1. 2 1
      config/config.exs
  2. 0 1
      lib/pleroma/user.ex
  3. 4 1
      mix.exs
  4. 5 5
      mix.lock
  5. 1 1
      test/web/ostatus/ostatus_test.exs

+ 2 - 1
config/config.exs

@@ -48,7 +48,8 @@ config :pleroma, ecto_repos: [Pleroma.Repo]
 
 config :pleroma, Pleroma.Repo,
   types: Pleroma.PostgresTypes,
-  telemetry_event: [Pleroma.Repo.Instrumenter]
+  telemetry_event: [Pleroma.Repo.Instrumenter],
+  migration_lock: nil
 
 config :pleroma, Pleroma.Captcha,
   enabled: false,

+ 0 - 1
lib/pleroma/user.ex

@@ -1144,7 +1144,6 @@ defmodule Pleroma.User do
     stream =
       ap_id
       |> Activity.query_by_actor()
-      |> Activity.with_preloaded_object()
       |> Repo.stream()
 
     Repo.transaction(fn -> Enum.each(stream, &delete_activity(&1)) end, timeout: :infinity)

+ 4 - 1
mix.exs

@@ -66,7 +66,10 @@ defmodule Pleroma.Mixfile do
       {:plug_cowboy, "~> 2.0"},
       {:phoenix_pubsub, "~> 1.1"},
       {:phoenix_ecto, "~> 4.0"},
-      {:ecto_sql, "~>3.0.5"},
+      {:ecto_sql,
+       git: "https://github.com/elixir-ecto/ecto_sql",
+       ref: "14cb065a74c488d737d973f7a91bc036c6245f78",
+       override: true},
       {:postgrex, ">= 0.13.5"},
       {:gettext, "~> 0.15"},
       {:comeonin, "~> 4.1.1"},

File diff suppressed because it is too large
+ 5 - 5
mix.lock


+ 1 - 1
test/web/ostatus/ostatus_test.exs

@@ -407,7 +407,7 @@ defmodule Pleroma.Web.OStatusTest do
       {:ok, user} = OStatus.find_or_make_user(uri)
       old_name = user.name
       old_bio = user.bio
-      change = Ecto.Changeset.change(user, %{avatar: nil, bio: nil, old_name: nil})
+      change = Ecto.Changeset.change(user, %{avatar: nil, bio: nil, name: nil})
 
       {:ok, user} = Repo.update(change)
       refute user.avatar