Skip to content

Commit

Permalink
fix: switch radio_number to string
Browse files Browse the repository at this point in the history
  • Loading branch information
mathcolo committed Oct 28, 2024
1 parent ef41443 commit 33d5735
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/orbit/operator_sign_in.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule Orbit.OperatorSignIn do
signed_in_by_user: User.t(),
signed_in_at: DateTime.t(),
rail_line: RailLine.t(),
radio_number: integer(),
radio_number: String.t() | nil,
sign_in_method: SignInMethod.t()
}

Expand All @@ -21,7 +21,7 @@ defmodule Orbit.OperatorSignIn do
belongs_to(:signed_in_by_user, User)
field(:signed_in_at, :utc_datetime)
field(:rail_line, RailLine)
field(:radio_number, :integer)
field(:radio_number, :string)
field(:sign_in_method, SignInMethod)

timestamps()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Orbit.Repo.Migrations.AlterSigninsRadio do

def change do
alter table(:operator_sign_ins) do
add :radio_number, :integer
add :radio_number, :string
end
end
end
2 changes: 1 addition & 1 deletion test/support/factory.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule Orbit.Factory do
signed_in_by_user: build(:user),
signed_in_at: DateTime.add(base_dt, sequence(:operator_sign_in_time_offset, & &1), :minute),
rail_line: :blue,
radio_number: 22,
radio_number: "22",
sign_in_method: :manual
}
end
Expand Down

0 comments on commit 33d5735

Please sign in to comment.