adr

adr

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?

Showing Posts 1 to 6

odix67

odix67

it should read, run migration til Oban schema version 11, as also mentioned in the doc, in the case you upgrade Oban to a newer version, you have run the migration once again, with a new migration file

adr

adr OP

I ran it at version 1 and got this warning:

[warning] The `oban_peers` table is undefined and leadership is disabled.
Run migrations up to v11 to restore peer leadership. In the meantime, distributed plugins
(e.g. Cron, Pruner, Stager) will not run on any nodes.

So 11 is significant. Any docs explaining what the versions mean?

odix67

odix67

hope @sorentwo will answer your question. My first project, 2 years ago using Oban, it uses version 11 by default

LostKobrakai

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

sorentwo

Oban Core Team

@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.

adr

adr OP

That makes sense. Even though it’s an extra step, I found the module docs for migration separating the initial migration from the upgrade to be illuminating.

An explanation as to why the version number differs from the library version number would be helpful. Additionally, I’m curious if I’d ever want to downgrade to version 1 as the install guide suggests I might.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews