diff --git a/lib/afc/emotion/happy.ex b/lib/afc/emotion/happy.ex index 9a3e03a..59aad27 100644 --- a/lib/afc/emotion/happy.ex +++ b/lib/afc/emotion/happy.ex @@ -4,7 +4,7 @@ defmodule Afc.Emotion.Happy do schema "happy" do - field :reason_text, :string + field :reason, :string timestamps() end @@ -12,6 +12,6 @@ defmodule Afc.Emotion.Happy do @doc false def changeset(happy, attrs) do happy - |> cast(attrs, [:reason_text]) + |> cast(attrs, [:reason]) end end diff --git a/priv/repo/migrations/20181014104921_create_happy.exs b/priv/repo/migrations/20181014104921_create_happy.exs index e14a5a8..b8abbcf 100644 --- a/priv/repo/migrations/20181014104921_create_happy.exs +++ b/priv/repo/migrations/20181014104921_create_happy.exs @@ -3,7 +3,7 @@ defmodule Afc.Repo.Migrations.CreateHappy do def change do create table(:happy) do - add :reason_text, :string + add :reason, :text timestamps() end diff --git a/priv/repo/migrations/20181014105259_create_angry.exs b/priv/repo/migrations/20181014105259_create_angry.exs index 6c15f60..9e0e047 100644 --- a/priv/repo/migrations/20181014105259_create_angry.exs +++ b/priv/repo/migrations/20181014105259_create_angry.exs @@ -13,7 +13,7 @@ defmodule Afc.Repo.Migrations.CreateAngry do add :classwork, :boolean, default: false, null: false add :homework, :boolean, default: false, null: false add :else, :boolean, default: false, null: false - add :reason, :string + add :reason, :text timestamps() end