defmodule Waxx.Repo.Migrations.CreateInvites do
use Ecto.Migration
def change do
create table(:invites) do
add :token, :string, null: false
add :note, :string
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(:invites, [:token])
create index(:invites, [:created_by_id])
end
end
neiam
/waxx
waxx
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
541 B · text
History
6929c1e