From 81b4243173f31fd47eb598fb7ed95cadadf90c2f Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 29 Sep 2019 23:52:40 +0300 Subject: [PATCH] Remove subscription_notifications table if it existed Followup to !1741 --- ...0190929201536_drop_subscription_if_exists.exs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 priv/repo/migrations/20190929201536_drop_subscription_if_exists.exs diff --git a/priv/repo/migrations/20190929201536_drop_subscription_if_exists.exs b/priv/repo/migrations/20190929201536_drop_subscription_if_exists.exs new file mode 100644 index 000000000..bbf70f78b --- /dev/null +++ b/priv/repo/migrations/20190929201536_drop_subscription_if_exists.exs @@ -0,0 +1,16 @@ +defmodule Pleroma.Repo.Migrations.DropSubscriptionIfExists do + use Ecto.Migration + + def change do + + end + + def up do + drop_if_exists(index(:subscription_notifications, [:user_id])) + drop_if_exists(index(:subscription_notifications, ["id desc nulls last"])) + drop_if_exists(table(:subscription_notifications)) + end + def down do + :ok + end +end -- 2.45.2