Merge branch 'chore/changelog-update' into 'develop'
[akkoma] / priv / repo / migrations / 20170415141210_add_unique_index_to_email_and_nickname.exs
index 361ca04daf6297ae12f5579c5102dd8b0991930c..42da88954707afb17e05d0a1322ec692ed09839a 100644 (file)
@@ -2,7 +2,7 @@ defmodule Pleroma.Repo.Migrations.AddUniqueIndexToEmailAndNickname do
   use Ecto.Migration
 
   def change do
-    create unique_index(:users, [:email])
-    create unique_index(:users, [:nickname])
+    create_if_not_exists unique_index(:users, [:email])
+    create_if_not_exists unique_index(:users, [:nickname])
   end
 end