summaryrefslogtreecommitdiff
path: root/priv
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
parent127e7b8ff9e5e7e1d26b6f7d80985f8144644ee5 (diff)
Update to Phoenix 1.6 and chase dependencies
Also bump minimum Elixir to 1.11
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20221103014611_create_oban_peers.exs7
-rw-r--r--priv/repo/migrations/20221103014728_swap_primary_oban_indexes.exs26
2 files changed, 33 insertions, 0 deletions
diff --git a/priv/repo/migrations/20221103014611_create_oban_peers.exs b/priv/repo/migrations/20221103014611_create_oban_peers.exs
new file mode 100644
index 000000000..cb522a056
--- /dev/null
+++ b/priv/repo/migrations/20221103014611_create_oban_peers.exs
@@ -0,0 +1,7 @@
+defmodule Pleroma.Repo.Migrations.CreateObanPeers do
+ use Ecto.Migration
+
+ def up, do: Oban.Migrations.up(version: 11)
+
+ def down, do: Oban.Migrations.down(version: 11)
+end
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