Packages

This library is a summary of the functions that are generally required for Web service development.

Current section

Files

Jump to
servicex priv repo migrations 20180613073220_create_users.exs
Raw

priv/repo/migrations/20180613073220_create_users.exs

defmodule Servicex.Repo.Migrations.CreateUsers do
use Ecto.Migration
def change do
create table(:users) do
add :name, :string
add :email, :string
add :hashed_password, :string
add :role, :string
add :status, :integer, default: 1
timestamps()
end
create unique_index(:users, [:email])
create index(:users, [:status])
end
end