Merge branch 'fix-oban-migration' into 'master'
Fix oban jobs migrations (especially on PostgreSQL < 12) See merge request framasoft/mobilizon!701
This commit is contained in:
commit
95dafcecee
@ -0,0 +1,15 @@
|
||||
defmodule Mobilizon.Storage.Repo.Migrations.FixObanMigrationsForOlderPostgreSQLVersions do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
def up do
|
||||
Ecto.Adapters.SQL.query!(
|
||||
Mobilizon.Storage.Repo,
|
||||
"ALTER TYPE oban_job_state ADD VALUE IF NOT EXISTS 'cancelled'"
|
||||
)
|
||||
end
|
||||
|
||||
def down do
|
||||
IO.puts("This migration doesn't handle being reverted.")
|
||||
end
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
defmodule Mobilizon.Storage.Repo.Migrations.UpgradeObanJobsToV9 do
|
||||
use Ecto.Migration
|
||||
|
||||
defdelegate up, to: Oban.Migrations
|
||||
defdelegate down, to: Oban.Migrations
|
||||
end
|
Loading…
Reference in New Issue
Block a user