defmodule OhMyExOhIrcd.Repo.Migrations.CreateUserInvites do
use Ecto.Migration
def change do
create table(:user_invites) do
add :token, :string, null: false
add :note, :string, default: ""
add :created_by_id, references(:users, on_delete: :nilify_all)
add :consumed_by_id, references(:users, on_delete: :nilify_all)
add :expires_at, :utc_datetime
add :consumed_at, :utc_datetime
timestamps(type: :utc_datetime)
end
create unique_index(:user_invites, [:token])
create index(:user_invites, [:consumed_at])
end
end
neiam
/oh-my-ex-oh-ircd
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
579 B · text
History
1bba52e