defmodule Microwaveprop.Repo.Migrations.ObanProV17 do @moduledoc """ Oban Pro 1.7 schema migration. Per the v1.7 upgrade guide: * Adds the database-backed workflow tracking tables. * Replaces the legacy generated `uniq_key` / `partition_key` columns with expression indexes (faster + reclaims storage). * Adds new partial indexes for improved query performance. * Renames the legacy workflow indexes with an `_old` suffix — a follow-up migration can drop them once we're confident the new indexes are healthy. The 1.7 release docs note that for very large `oban_jobs` tables, the schema and index work should be split into separate migrations with DDL transactions disabled for the index half. Our prod `oban_jobs` table holds at most a few hours of jobs (Pruner runs daily, max_age 24h) so the inline default is fine — we're nowhere near the size where Postgres would lock-storm on a regular index CREATE. """ use Ecto.Migration def up, do: Oban.Pro.Migration.up(version: "1.7.0") def down, do: Oban.Pro.Migration.down(version: "1.7.0") end