Skip to content

Commit

Permalink
alter happy & angry tables reason columns #29 #34
Browse files Browse the repository at this point in the history
  • Loading branch information
RobStallion committed Oct 18, 2018
1 parent 9a95c9e commit c4d4378
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/afc/emotion/happy.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ defmodule Afc.Emotion.Happy do


schema "happy" do
field :reason_text, :string
field :reason, :string

timestamps()
end

@doc false
def changeset(happy, attrs) do
happy
|> cast(attrs, [:reason_text])
|> cast(attrs, [:reason])
end
end
2 changes: 1 addition & 1 deletion priv/repo/migrations/20181014104921_create_happy.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion priv/repo/migrations/20181014105259_create_angry.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4d4378

Please sign in to comment.