Created
October 20, 2016 19:29
-
-
Save bnhansn/f393f57444b30dbfa442fe0d0070a2dc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| defmodule Sling.Repo.Migrations.CreateUser do | |
| use Ecto.Migration | |
| def change do | |
| create table(:users) do | |
| add :username, :string, null: false | |
| add :email, :string, null: false | |
| add :password_hash, :string, null: false | |
| timestamps() | |
| end | |
| create unique_index(:users, [:username]) | |
| create unique_index(:users, [:email]) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment