diff --git a/lib/trento/application/read_models/application_instance_read_model.ex b/lib/trento/application/read_models/application_instance_read_model.ex index 9792c78e12..cca67a90cc 100644 --- a/lib/trento/application/read_models/application_instance_read_model.ex +++ b/lib/trento/application/read_models/application_instance_read_model.ex @@ -26,7 +26,7 @@ defmodule Trento.ApplicationInstanceReadModel do field :start_priority, :string field :host_id, Ecto.UUID, primary_key: true field :health, Ecto.Enum, values: Health.values() - field :absent, :utc_datetime_usec + field :absent_at, :utc_datetime_usec has_one :host, HostReadModel, references: :host_id, diff --git a/lib/trento/application/read_models/database_instance_read_model.ex b/lib/trento/application/read_models/database_instance_read_model.ex index e70b87a766..938ac610f7 100644 --- a/lib/trento/application/read_models/database_instance_read_model.ex +++ b/lib/trento/application/read_models/database_instance_read_model.ex @@ -29,7 +29,7 @@ defmodule Trento.DatabaseInstanceReadModel do field :system_replication, :string, default: "" field :system_replication_status, :string, default: "" field :health, Ecto.Enum, values: Health.values() - field :absent, :utc_datetime_usec + field :absent_at, :utc_datetime_usec has_one :host, HostReadModel, references: :host_id, diff --git a/lib/trento/application/usecases/sap_systems/sap_systems.ex b/lib/trento/application/usecases/sap_systems/sap_systems.ex index c5f671a1c4..90dce50a0f 100644 --- a/lib/trento/application/usecases/sap_systems/sap_systems.ex +++ b/lib/trento/application/usecases/sap_systems/sap_systems.ex @@ -73,7 +73,7 @@ defmodule Trento.SapSystems do host_id: host_id, instance_number: instance_number ) do - %ApplicationInstanceReadModel{absent: nil} -> + %ApplicationInstanceReadModel{absent_at: nil} -> {:error, :instance_present} _ -> @@ -101,7 +101,7 @@ defmodule Trento.SapSystems do host_id: host_id, instance_number: instance_number ) do - %DatabaseInstanceReadModel{absent: nil} -> + %DatabaseInstanceReadModel{absent_at: nil} -> {:error, :instance_present} _ -> diff --git a/priv/repo/migrations/20230822144338_add_absent_application_instance_read_model.exs b/priv/repo/migrations/20230822144338_add_absent_at_application_instance_read_model.exs similarity index 80% rename from priv/repo/migrations/20230822144338_add_absent_application_instance_read_model.exs rename to priv/repo/migrations/20230822144338_add_absent_at_application_instance_read_model.exs index 6056d9c963..b6d796902b 100644 --- a/priv/repo/migrations/20230822144338_add_absent_application_instance_read_model.exs +++ b/priv/repo/migrations/20230822144338_add_absent_at_application_instance_read_model.exs @@ -3,7 +3,7 @@ defmodule Trento.Repo.Migrations.AddAbsentApplicationInstanceReadModel do def change do alter table(:application_instances) do - add :absent, :utc_datetime_usec + add :absent_at, :utc_datetime_usec end end end diff --git a/priv/repo/migrations/20230822144348_add_absent_database_instance_read_model.exs b/priv/repo/migrations/20230822144348_add_absent_at_database_instance_read_model.exs similarity index 80% rename from priv/repo/migrations/20230822144348_add_absent_database_instance_read_model.exs rename to priv/repo/migrations/20230822144348_add_absent_at_database_instance_read_model.exs index f92f179740..900ab9d676 100644 --- a/priv/repo/migrations/20230822144348_add_absent_database_instance_read_model.exs +++ b/priv/repo/migrations/20230822144348_add_absent_at_database_instance_read_model.exs @@ -3,7 +3,7 @@ defmodule Trento.Repo.Migrations.AddAbsentDatabaseInstanceReadModel do def change do alter table(:database_instances) do - add :absent, :utc_datetime_usec + add :absent_at, :utc_datetime_usec end end end