-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unique email constraint for users. Part of #101
- Loading branch information
Ary Borenszweig
committed
Oct 14, 2016
1 parent
88f45e9
commit 392fed6
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
priv/repo/migrations/20161014181536_add_unique_email_index_to_users.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
defmodule Ask.Repo.Migrations.AddUniqueEmailIndexToUsers do | ||
use Ecto.Migration | ||
|
||
def change do | ||
create unique_index(:users, [:email]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters