summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20221103014728_swap_primary_oban_indexes.exs
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2022-11-02 21:56:43 -0400
committerMark Felder <feld@feld.me>2022-11-03 16:13:07 +0000
commit7c64f705f6ee0364f1e016004bb0baf79d88dae2 (patch)
tree0584b8a163ea27b656ea1f69bb9efaaf43da6281 /priv/repo/migrations/20221103014728_swap_primary_oban_indexes.exs
parent127e7b8ff9e5e7e1d26b6f7d80985f8144644ee5 (diff)
downloadpleroma-7c64f705f6ee0364f1e016004bb0baf79d88dae2.tar.gz
pleroma-7c64f705f6ee0364f1e016004bb0baf79d88dae2.zip
Update to Phoenix 1.6 and chase dependencies
Also bump minimum Elixir to 1.11
Diffstat (limited to 'priv/repo/migrations/20221103014728_swap_primary_oban_indexes.exs')
-rw-r--r--priv/repo/migrations/20221103014728_swap_primary_oban_indexes.exs26
1 files changed, 26 insertions, 0 deletions
diff --git a/priv/repo/migrations/20221103014728_swap_primary_oban_indexes.exs b/priv/repo/migrations/20221103014728_swap_primary_oban_indexes.exs
new file mode 100644
index 000000000..54e2503de
--- /dev/null
+++ b/priv/repo/migrations/20221103014728_swap_primary_oban_indexes.exs
@@ -0,0 +1,26 @@
+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