Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85595602
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/priv/repo/migrations/20200714081657_oban_2_0_config_changes.exs b/priv/repo/migrations/20200714081657_oban_2_0_config_changes.exs
index c54bb2511..81f93d0e3 100644
--- a/priv/repo/migrations/20200714081657_oban_2_0_config_changes.exs
+++ b/priv/repo/migrations/20200714081657_oban_2_0_config_changes.exs
@@ -1,27 +1,26 @@
defmodule Elixir.Pleroma.Repo.Migrations.Oban20ConfigChanges do
use Ecto.Migration
import Ecto.Query
alias Pleroma.ConfigDB
alias Pleroma.Repo
def change do
config_entry =
from(c in ConfigDB, where: c.group == ^":pleroma" and c.key == ^"Oban")
|> select([c], struct(c, [:value, :id]))
|> Repo.one()
if config_entry do
%{value: value} = config_entry
-
value =
case Keyword.fetch(value, :verbose) do
{:ok, log} -> Keyword.put_new(value, :log, log)
_ -> value
end
|> Keyword.drop([:verbose, :prune])
Ecto.Changeset.change(config_entry, %{value: value})
|> Repo.update()
end
end
end
diff --git a/priv/repo/migrations/20220201172057_oban_2_0_changes_redux.exs b/priv/repo/migrations/20220201172057_oban_2_0_changes_redux.exs
index 52b18cc09..220a3bf26 100644
--- a/priv/repo/migrations/20220201172057_oban_2_0_changes_redux.exs
+++ b/priv/repo/migrations/20220201172057_oban_2_0_changes_redux.exs
@@ -1,36 +1,26 @@
defmodule Elixir.Pleroma.Repo.Migrations.Oban20ChangesRedux do
use Ecto.Migration
import Ecto.Query
alias Pleroma.ConfigDB
alias Pleroma.Repo
- require Logger
-
def change do
config_entry =
from(c in ConfigDB, where: c.group == ^":pleroma" and c.key == ^"Oban")
|> select([c], struct(c, [:value, :id]))
|> Repo.one()
if config_entry do
%{value: value} = config_entry
-
- # Logger.info(
- # "Found Oban config entry: #{inspect(config_entry)}"
- # )
-
- # if there was a value of "" for verbose, it would have stayed as "" for log in the last migration
- # this is not valid and was causing a crash on startup. it needs to be false, or a valid log level string
-
value =
case Keyword.fetch(value, :log) do
{:ok, log} -> Keyword.put(value, :log, false)
_ -> value
end
Ecto.Changeset.change(config_entry, %{value: value})
|> Repo.update()
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jul 19, 3:49 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1695305
Default Alt Text
(2 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment