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

17 lines
320 B
Elixir

defmodule Chessh.Repo.Migrations.AddKeys do
use Ecto.Migration
def change do
create table(:keys) do
add(:key, :text, null: false)
add(:name, :string, null: false)
add(:player_id, references(:players))
timestamps()
end
create(unique_index(:keys, [:player_id, :key]))
end
end