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