mirror of
https://github.com/kevin-DL/phoenix_api_template.git
synced 2026-01-11 10:44:32 +00:00
16 lines
334 B
Elixir
16 lines
334 B
Elixir
defmodule PhoenixApiTemplate.Repo.Migrations.CreateUsers do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:users, primary_key: false) do
|
|
add :id, :binary_id, primary_key: true
|
|
add :email, :string
|
|
add :hashed_password, :string
|
|
|
|
timestamps()
|
|
end
|
|
|
|
create unique_index(:users, [:email])
|
|
end
|
|
end
|