# Upgrading to v0.8 ## Reinstall the Schema (Required) Oban Pro v0.8 adds indexes for batch and chain lookups. Run the install command again: ```bash obanpro install ``` Or apply `install_sql()` through a new migration in your migration framework. Installation is idempotent, and only the missing indexes are created. Databases shared with Oban Pro for Elixir already have the indexes. On large `oban_jobs` tables, creating `oban_jobs_batch_index` and `oban_jobs_chain_index` blocks writes while they build. Create the indexes concurrently beforehand, and the install will skip them: ```sql CREATE INDEX CONCURRENTLY IF NOT EXISTS oban_jobs_batch_index ON oban_jobs (state, (meta->>'batch_id'), (meta->>'callback')) WHERE meta ? 'batch_id'; CREATE INDEX CONCURRENTLY IF NOT EXISTS oban_jobs_chain_index ON oban_jobs ((meta->>'chain_id'), id DESC) WHERE meta ? 'chain_id' AND state != 'completed'; ``` ## Move Partitions Inside Limits (Required) Partitioning is now set inside `global_limit` or `rate_limit`, rather than as a top-level queue option. A top-level `partition` raises an unknown options error on start. Move it into the limit it applies to: ```diff [queues.default] limit = 10 -global_limit = 1 -partition = "worker" +global_limit = { allowed = 1, partition = "worker" } ``` The same applies to rate limited queues: ```diff [queues.default] limit = 10 -rate_limit = { allowed = 100, period = 60 } -partition = { args = "account_id" } +rate_limit = { allowed = 100, period = 60, partition = { args = "account_id" } } ``` The partition syntax itself is unchanged. Queues may now combine a `global_limit` and a `rate_limit`, as long as only one of them is partitioned.