summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20190205114625_create_thread_mutes.exs
diff options
context:
space:
mode:
Diffstat (limited to 'priv/repo/migrations/20190205114625_create_thread_mutes.exs')
-rw-r--r--priv/repo/migrations/20190205114625_create_thread_mutes.exs4
1 files changed, 2 insertions, 2 deletions
diff --git a/priv/repo/migrations/20190205114625_create_thread_mutes.exs b/priv/repo/migrations/20190205114625_create_thread_mutes.exs
index 8e9eccbae..7e44db121 100644
--- a/priv/repo/migrations/20190205114625_create_thread_mutes.exs
+++ b/priv/repo/migrations/20190205114625_create_thread_mutes.exs
@@ -2,11 +2,11 @@ defmodule Pleroma.Repo.Migrations.CreateThreadMutes do
use Ecto.Migration
def change do
- create table(:thread_mutes) do
+ create_if_not_exists table(:thread_mutes) do
add :user_id, references(:users, type: :uuid, on_delete: :delete_all)
add :context, :string
end
- create unique_index(:thread_mutes, [:user_id, :context], name: :unique_index)
+ create_if_not_exists unique_index(:thread_mutes, [:user_id, :context], name: :unique_index)
end
end