AE
Ash Elixir•3y ago
Blibs

Create a custom migration file

I need to create a custom migration file for Oban, something like this:
defmodule MyApp.Repo.Migrations.AddObanJobsTable do
use Ecto.Migration

def up do
Oban.Migration.up(version: 11)
end

# We specify `version: 1` in `down`, ensuring that we'll roll all the way back down if
# necessary, regardless of which version we've migrated `up` to.
def down do
Oban.Migration.down(version: 1)
end
end
defmodule MyApp.Repo.Migrations.AddObanJobsTable do
use Ecto.Migration

def up do
Oban.Migration.up(version: 11)
end

# We specify `version: 1` in `down`, ensuring that we'll roll all the way back down if
# necessary, regardless of which version we've migrated `up` to.
def down do
Oban.Migration.down(version: 1)
end
end
I was wondering if there is any problem if I create this custom migration with mix ecto.gen.migration my_migration or if this will somehow create problems/conflicts with the way Ash handles its migrations right now.
1 Reply
ZachDaniel
ZachDaniel•3y ago
nope 🙂 Does not affect anything Ash does.

Did you find this page helpful?