Fakultas Ilmu Komputer UI

20201211030926_create_users.exs 346 Bytes
Newer Older
1
2
3
4
defmodule Diskuy.Repo.Migrations.CreateUsers do
  use Ecto.Migration

  def change do
5
    create table(:users) do
6
      add :username, :string
7
      add :email, :string
8
      add :picture, :string
9
      add :role, :string
10
11
12
      timestamps()
    end
    create unique_index(:users, [:username])
13
    create unique_index(:users, [:email])
14
15
  end
end