chessh/priv/repo/migrations/20221229225559_add_user_session.exs
2022-12-30 05:46:35 -07:00

16 lines
378 B
Elixir

defmodule Chessh.Repo.Migrations.AddUserSession do
use Ecto.Migration
def change do
create table(:player_sessions) do
add(:process, :string)
add(:login, :utc_datetime_usec)
add(:player_id, references(:players))
add(:node_id, references(:nodes, type: :string))
end
create(unique_index(:player_sessions, [:process, :node_id]))
end
end