Remove performerId.

This commit is contained in:
codevictory
2021-03-28 16:22:19 +03:00
parent da4ed0a6c1
commit 4a21ae7616
7 changed files with 46 additions and 28 deletions

View File

@@ -8,7 +8,6 @@ defmodule Runosaari.Registration.Performer do
field :fname, :string
field :lname, :string
field :notes, :string
field :performerId, :integer
field :tel, :string
timestamps()
@@ -17,9 +16,8 @@ defmodule Runosaari.Registration.Performer do
@doc false
def changeset(performer, attrs) do
performer
|> cast(attrs, [:performerId, :fname, :lname, :email, :tel, :confirmed, :notes])
|> validate_required([:performerId, :fname, :lname, :email, :tel, :confirmed, :notes])
|> unique_constraint(:performerId)
|> cast(attrs, [:fname, :lname, :email, :tel, :confirmed, :notes])
|> validate_required([:fname, :lname, :email, :tel, :confirmed, :notes])
|> unique_constraint(:email)
end
end