[day-02] validate user input

Also improve migration to reflect requirements in validation done
through `Ecto.Changeset`.
This commit is contained in:
Joao P Dubas
2021-06-22 23:56:07 +00:00
parent 97af827bc2
commit d578bc6cf3
2 changed files with 17 additions and 3 deletions

View File

@@ -3,9 +3,9 @@ defmodule Wabanex.Repo.Migrations.CreateUsersTable do
def change do
create table(:users) do
add :email, :string
add :name, :string
add :password, :string
add :email, :string, null: false
add :name, :string, null: false
add :password, :string, null: false
timestamps()
end