diff options
Diffstat (limited to 'priv/repo/migrations/20190205114625_create_thread_mutes.exs')
| -rw-r--r-- | priv/repo/migrations/20190205114625_create_thread_mutes.exs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/priv/repo/migrations/20190205114625_create_thread_mutes.exs b/priv/repo/migrations/20190205114625_create_thread_mutes.exs index 8e9eccbae..baaf07253 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 |
