From ee2eb7752d6a6f3542fa3a883faa02de2ccbbef8 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 16 Sep 2022 13:00:40 +0100 Subject: [PATCH] Ensure rollback succeeds --- .../migrations/20220916115149_ensure_mastofe_settings.exs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs b/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs index 37880ff99..1d0a6e050 100644 --- a/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs +++ b/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs @@ -1,9 +1,15 @@ defmodule Pleroma.Repo.Migrations.EnsureMastofeSettings do use Ecto.Migration - def change do + def up do alter table(:users) do add_if_not_exists(:mastofe_settings, :map) end end + + def down do + alter table(:users) do + remove_if_exists(:mastofe_settings, :map) + end + end end -- 2.45.2