chessh/priv/repo/migrations/20221219082326_create_player.exs
2022-12-21 17:21:36 -07:00

16 lines
354 B
Elixir

defmodule Chessh.Repo.Migrations.CreatePlayer do
use Ecto.Migration
def change do
execute("CREATE EXTENSION IF NOT EXISTS citext", "")
create table(:players) do
add(:username, :citext, null: false)
add(:hashed_password, :string, null: false)
timestamps()
end
create(unique_index(:players, [:username]))
end
end