summaryrefslogtreecommitdiff
path: root/priv/repo
diff options
context:
space:
mode:
Diffstat (limited to 'priv/repo')
-rw-r--r--priv/repo/migrations/20170415141210_add_unique_index_to_email_and_nickname.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/priv/repo/migrations/20170415141210_add_unique_index_to_email_and_nickname.exs b/priv/repo/migrations/20170415141210_add_unique_index_to_email_and_nickname.exs
new file mode 100644
index 000000000..361ca04da
--- /dev/null
+++ b/priv/repo/migrations/20170415141210_add_unique_index_to_email_and_nickname.exs
@@ -0,0 +1,8 @@
+defmodule Pleroma.Repo.Migrations.AddUniqueIndexToEmailAndNickname do
+ use Ecto.Migration
+
+ def change do
+ create unique_index(:users, [:email])
+ create unique_index(:users, [:nickname])
+ end
+end