summaryrefslogtreecommitdiff
path: root/priv/repo/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'priv/repo/migrations')
-rw-r--r--priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs11
-rw-r--r--priv/repo/migrations/20231107200724_consolidate_email_queues.exs9
2 files changed, 20 insertions, 0 deletions
diff --git a/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs b/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs
new file mode 100644
index 000000000..c746f12a1
--- /dev/null
+++ b/priv/repo/migrations/20220527134341_add_quote_url_index_to_objects.exs
@@ -0,0 +1,11 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Repo.Migrations.AddQuoteUrlIndexToObjects do
+ use Ecto.Migration
+
+ def change do
+ create_if_not_exists(index(:objects, ["(data->'quoteUrl')"], name: :objects_quote_url))
+ end
+end
diff --git a/priv/repo/migrations/20231107200724_consolidate_email_queues.exs b/priv/repo/migrations/20231107200724_consolidate_email_queues.exs
new file mode 100644
index 000000000..63f5af369
--- /dev/null
+++ b/priv/repo/migrations/20231107200724_consolidate_email_queues.exs
@@ -0,0 +1,9 @@
+defmodule Pleroma.Repo.Migrations.ConsolidateEmailQueues do
+ use Ecto.Migration
+
+ def change do
+ execute(
+ "UPDATE oban_jobs SET queue = 'mailer' WHERE queue in ('digest_emails', 'new_users_digest')"
+ )
+ end
+end