mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-18 15:41:05 +00:00
27 lines
533 B
Elixir
27 lines
533 B
Elixir
|
defmodule Pleroma.Repo.Migrations.SwapPrimaryObanIndexes do
|
||
|
use Ecto.Migration
|
||
|
|
||
|
@disable_ddl_transaction true
|
||
|
@disable_migration_lock true
|
||
|
|
||
|
def change do
|
||
|
create_if_not_exists(
|
||
|
index(
|
||
|
:oban_jobs,
|
||
|
[:state, :queue, :priority, :scheduled_at, :id],
|
||
|
concurrently: true,
|
||
|
prefix: "public"
|
||
|
)
|
||
|
)
|
||
|
|
||
|
drop_if_exists(
|
||
|
index(
|
||
|
:oban_jobs,
|
||
|
[:queue, :state, :priority, :scheduled_at, :id],
|
||
|
concurrently: true,
|
||
|
prefix: "public"
|
||
|
)
|
||
|
)
|
||
|
end
|
||
|
end
|