From 6a150de3bd416cfe0b4870deee2e6557791345f8 Mon Sep 17 00:00:00 2001 From: Karen Konou Date: Sat, 9 Feb 2019 20:52:11 +0100 Subject: Add unique index and unique constraint check, uniqueness test fails --- priv/repo/migrations/20190205114625_create_thread_mutes.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'priv') diff --git a/priv/repo/migrations/20190205114625_create_thread_mutes.exs b/priv/repo/migrations/20190205114625_create_thread_mutes.exs index b16f557f0..8e9eccbae 100644 --- a/priv/repo/migrations/20190205114625_create_thread_mutes.exs +++ b/priv/repo/migrations/20190205114625_create_thread_mutes.exs @@ -7,6 +7,6 @@ defmodule Pleroma.Repo.Migrations.CreateThreadMutes do add :context, :string end - create index(:thread_mutes, [:user_id]) + create unique_index(:thread_mutes, [:user_id, :context], name: :unique_index) end end -- cgit v1.2.3