chessh/priv/repo/migrations/20221219082326_create_player.exs

16 lines
390 B
Elixir
Raw Permalink Normal View History

defmodule Chessh.Repo.Migrations.CreatePlayer do
use Ecto.Migration
def change do
create table(:players) do
2023-01-31 16:01:35 -05:00
add(:discord_id, :string, null: false)
add(:username, :string, null: false)
add(:hashed_password, :string, null: true)
timestamps()
end
2022-12-20 03:06:18 -05:00
create(unique_index(:players, [:username]))
2023-01-31 16:01:35 -05:00
create(unique_index(:players, [:discord_id]))
end
end