From 33d57359d9a334f7374e5a5d3ce96e62b36cca8d Mon Sep 17 00:00:00 2001 From: Preston Mueller Date: Mon, 28 Oct 2024 16:20:19 -0400 Subject: [PATCH] fix: switch radio_number to string --- lib/orbit/operator_sign_in.ex | 4 ++-- .../20241023111912_alter_operator_sign_ins_radio.exs | 2 +- test/support/factory.ex | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/orbit/operator_sign_in.ex b/lib/orbit/operator_sign_in.ex index 9a066cb..b13ba33 100644 --- a/lib/orbit/operator_sign_in.ex +++ b/lib/orbit/operator_sign_in.ex @@ -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() } @@ -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() diff --git a/priv/repo/migrations/20241023111912_alter_operator_sign_ins_radio.exs b/priv/repo/migrations/20241023111912_alter_operator_sign_ins_radio.exs index 0bc9c68..8fa69c5 100644 --- a/priv/repo/migrations/20241023111912_alter_operator_sign_ins_radio.exs +++ b/priv/repo/migrations/20241023111912_alter_operator_sign_ins_radio.exs @@ -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 diff --git a/test/support/factory.ex b/test/support/factory.ex index 8c79f58..782f44b 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -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