replace coherence with guardian

This commit is contained in:
Thomas Citharel
2017-12-09 14:58:37 +01:00
parent 90ceb4f6fe
commit 8ac705d8c2
52 changed files with 208 additions and 1254 deletions

View File

@@ -3,14 +3,14 @@ defmodule Eventos.Repo.Migrations.CreateUsers do
def change do
create table(:users) do
add :username, :string
add :email, :string
add :role, :integer, default: 0
add :email, :string, null: false
add :role, :integer, default: 0, null: false
add :password_hash, :string
add :account_id, references(:accounts, on_delete: :delete_all, null: false)
timestamps()
end
create unique_index(:users, [:username])
create unique_index(:users, [:email])
end
end