From f21d86cb2afbe9026d51d2e35d7b4cdea270d5bf Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 16 Sep 2022 12:50:51 +0100 Subject: [PATCH 1/2] Update oban_jobs priority Fixes #213 --- priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs b/priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs index eb9c4986c..ba1c849c4 100644 --- a/priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs +++ b/priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs @@ -1,7 +1,10 @@ defmodule Pleroma.Repo.Migrations.UpgradeObanToV11 do use Ecto.Migration - def up, do: Oban.Migrations.up(version: 11) + def up do + execute("UPDATE oban_jobs SET priority = 0 WHERE priority IS NULL;") + Oban.Migrations.up(version: 11) + end def down, do: Oban.Migrations.down(version: 11) end -- 2.34.1 From dde8920e9785cfae7cb59e4336d38ba50c1555c9 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 16 Sep 2022 12:52:18 +0100 Subject: [PATCH 2/2] Ensure mastofe settings exists --- .../20220916115149_ensure_mastofe_settings.exs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs diff --git a/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs b/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs new file mode 100644 index 000000000..37880ff99 --- /dev/null +++ b/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.EnsureMastofeSettings do + use Ecto.Migration + + def change do + alter table(:users) do + add_if_not_exists(:mastofe_settings, :map) + end + end +end -- 2.34.1