Skip to content

Commit

Permalink
archived entitites of an ems should be destroyed with the ems
Browse files Browse the repository at this point in the history
  • Loading branch information
Ari Zellner committed Mar 19, 2017
1 parent 4ba4e43 commit c8ceb77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/manageiq/providers/container_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class ContainerManager < BaseManager
has_one :container_deployment, :foreign_key => :deployed_ems_id, :inverse_of => :deployed_ems
has_many :computer_systems, :through => :container_nodes

# Archived entities to destroy when the container manager is deleted
has_many :old_container_groups, :foreign_key => :old_ems_id, :dependent => :destroy, :class_name => "ContainerGroup"
has_many :old_container_projects, :foreign_key => :old_ems_id, :dependent => :destroy, :class_name => "ContainerProject"
has_many :old_container_images, :foreign_key => :old_ems_id, :dependent => :destroy, :class_name => "ContainerImage"

virtual_column :port_show, :type => :string

supports :external_logging do
Expand Down

0 comments on commit c8ceb77

Please sign in to comment.