Skip to content

Commit

Permalink
Restore updated_at field
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Jan 16, 2025
1 parent 9af180d commit 6916883
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/wanda/operations/operation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ defmodule Wanda.Operations.Operation do

@type t :: %__MODULE__{}

@fields ~w(operation_id group_id result status agent_reports started_at completed_at)a
@fields ~w(operation_id group_id result status agent_reports started_at updated_at completed_at)a
@target_fields ~w(agent_id arguments)a

@required_fields ~w(operation_id group_id result status)a
Expand All @@ -35,7 +35,7 @@ defmodule Wanda.Operations.Operation do

field :agent_reports, {:array, :map}

timestamps(type: :utc_datetime_usec, inserted_at: :started_at, updated_at: false)
timestamps(type: :utc_datetime_usec, inserted_at: :started_at)
field :completed_at, :utc_datetime_usec
end

Expand Down
2 changes: 1 addition & 1 deletion priv/repo/migrations/20250109154813_add_operation.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule Wanda.Repo.Migrations.AddOperation do
add :targets, :map, null: false, default: "[]"
add :agent_reports, :map, null: false, default: "[]"

timestamps(type: :utc_datetime_usec, inserted_at: :started_at, updated_at: false)
timestamps(type: :utc_datetime_usec, inserted_at: :started_at)
add :completed_at, :utc_datetime_usec
end

Expand Down

0 comments on commit 6916883

Please sign in to comment.