From 38db7d2354932e4e3df35d28f7a7801a84e0a185 Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Thu, 7 Feb 2019 16:06:00 -0500 Subject: [PATCH] Remove vmdb_database attributes from VmdbDatabaseConnection You can't assign to a virtual column and all the other methods caused errors --- app/models/vmdb_database_connection.rb | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/models/vmdb_database_connection.rb b/app/models/vmdb_database_connection.rb index fd641a1b69c9..d255ef3572f4 100644 --- a/app/models/vmdb_database_connection.rb +++ b/app/models/vmdb_database_connection.rb @@ -17,9 +17,7 @@ class VmdbDatabaseConnection < ApplicationRecord virtual_column :task_state, :type => :string virtual_column :wait_resource, :type => :integer # oid virtual_column :wait_time, :type => :integer - virtual_column :vmdb_database_id, :type => :integer - virtual_belongs_to :vmdb_database virtual_belongs_to :zone virtual_belongs_to :miq_server virtual_belongs_to :miq_worker @@ -49,10 +47,6 @@ def self.log_statistics(output = $log) end end - def vmdb_database_id - @vmdb_database_id ||= self.class.vmdb_database.id - end - def address client_addr end @@ -111,14 +105,6 @@ def to_csv_hash } end - def vmdb_database - VmdbDatabase.find_by(:id => vmdb_database_id) - end - - def vmdb_database=(db) - self.vmdb_database_id = db.id - end - def miq_worker @miq_worker ||= MiqWorker.find_current_in_my_region.find_by(:sql_spid => spid) end