diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 30e09672..97278e94 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,12 @@ +2026-03-27 +fix: add suspended state to oban_job_state enum + - Oban 2.18+ introduced the 'suspended' job state for pausing jobs + - Oban.Met.Reporter queries for this state, causing PostgreSQL enum errors + - Migration adds 'suspended' to the oban_job_state enum type + - Required by recent Oban dependency updates (commit 0399b30d) + - Fixes GenServer crash: invalid input value for enum oban_job_state: "suspended" + Files: priv/repo/migrations/20260327231100_add_suspended_to_oban_job_state.exs + 2026-03-27 fix: remove duplicate sync_connect option from Phoenix.PubSub.Redis configuration - Phoenix.PubSub.Redis 3.1.0 automatically appends sync_connect: true to redis_opts diff --git a/priv/repo/migrations/20260327231100_add_suspended_to_oban_job_state.exs b/priv/repo/migrations/20260327231100_add_suspended_to_oban_job_state.exs new file mode 100644 index 00000000..33b51681 --- /dev/null +++ b/priv/repo/migrations/20260327231100_add_suspended_to_oban_job_state.exs @@ -0,0 +1,19 @@ +defmodule Towerops.Repo.Migrations.AddSuspendedToObanJobState do + use Ecto.Migration + + @disable_ddl_transaction true + + def up do + # Add 'suspended' state to oban_job_state enum + # This state was added in Oban 2.18+ and is required by Oban.Met + execute """ + ALTER TYPE oban_job_state ADD VALUE IF NOT EXISTS 'suspended' + """ + end + + def down do + # Cannot remove enum values in PostgreSQL without recreating the type + # This is a one-way migration + :ok + end +end