Skip to content

Commit

Permalink
define create_users migration on p.56 for #55
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Jan 22, 2019
1 parent edad32d commit e4ce2d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rumbl/priv/repo/migrations/20190122223734_create_users.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ defmodule Rumbl.Repo.Migrations.CreateUsers do
use Ecto.Migration

def change do
create table(:users) do
add :name, :string
add :username, :string, null: false

timestamps()

end

create unique_index(:users, [:username])
end
end

0 comments on commit e4ce2d5

Please sign in to comment.