adr
Oban: Is there a reason the install guide recomends calling `up` with version 11?
Hello all. Adding oban to a project and wondering why the install guide has the following:
def up do
Oban.Migration.up(version: 11)
end
Is version 11 somehow significant? I find this to be a little confusing so assuming there might be a reason for it, but it’s not explained. Why would my first version be 11?
Most Liked
LostKobrakai
Different versions of oban need different migrations executed. The current oban version you’re running requires version 11. Eventually oban might introduce new changes to their db setup, which will go into version 12. At that point you need to update your version 11 setup in your db to version 12 (in a new migration) and for rollback to go back from version 12 to version 11.
That’s why these migrations are versioned: To allow you to write migrations, which update oban step by step over the lifetime of your project using oban.
sorentwo
@LostKobrakai’s answer is exactly correct. It seems like some variant of that should make it into the Oban.Migration docs, or the install guide.
Early on, there were a lot of migrations while we figured things out. For the past few years, the schema has been stable and no more migrations are planned.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









