add DBIC controls to prevent cascade on Virtual FKCs
This commit is contained in:
		| @@ -119,7 +119,8 @@ __PACKAGE__->has_many( nodes_with_age => 'App::Netdisco::DB::Result::Virtual::No | ||||
|     'foreign.switch' => 'self.ip', | ||||
|     'foreign.port' => 'self.port', | ||||
|   }, | ||||
|   { join_type => 'LEFT' }, | ||||
|   { join_type => 'LEFT', | ||||
|     cascade_copy => 0, cascade_update => 0, cascade_delete => 0 }, | ||||
| ); | ||||
|  | ||||
| __PACKAGE__->has_many( active_nodes => 'App::Netdisco::DB::Result::Virtual::ActiveNode', | ||||
| @@ -127,7 +128,8 @@ __PACKAGE__->has_many( active_nodes => 'App::Netdisco::DB::Result::Virtual::Acti | ||||
|     'foreign.switch' => 'self.ip', | ||||
|     'foreign.port' => 'self.port', | ||||
|   }, | ||||
|   { join_type => 'LEFT' }, | ||||
|   { join_type => 'LEFT', | ||||
|     cascade_copy => 0, cascade_update => 0, cascade_delete => 0 }, | ||||
| ); | ||||
|  | ||||
| __PACKAGE__->has_many( active_nodes_with_age => 'App::Netdisco::DB::Result::Virtual::ActiveNodeWithAge', | ||||
| @@ -135,7 +137,8 @@ __PACKAGE__->has_many( active_nodes_with_age => 'App::Netdisco::DB::Result::Virt | ||||
|     'foreign.switch' => 'self.ip', | ||||
|     'foreign.port' => 'self.port', | ||||
|   }, | ||||
|   { join_type => 'LEFT' }, | ||||
|   { join_type => 'LEFT', | ||||
|     cascade_copy => 0, cascade_update => 0, cascade_delete => 0 }, | ||||
| ); | ||||
|  | ||||
| =head2 neighbor_alias | ||||
| @@ -178,7 +181,8 @@ __PACKAGE__->has_many( port_vlans_tagged => 'App::Netdisco::DB::Result::Virtual: | ||||
|     'foreign.ip' => 'self.ip', | ||||
|     'foreign.port' => 'self.port', | ||||
|   }, | ||||
|   { join_type => 'LEFT' }, | ||||
|   { join_type => 'LEFT', | ||||
|     cascade_copy => 0, cascade_update => 0, cascade_delete => 0 }, | ||||
| ); | ||||
|  | ||||
| =head2 tagged_vlans | ||||
|   | ||||
| @@ -55,6 +55,7 @@ Link relationship for C<tagging_ports>, see below. | ||||
|  | ||||
| __PACKAGE__->has_many( port_vlans_tagged => 'App::Netdisco::DB::Result::Virtual::DevicePortVlanTagged', | ||||
|     { 'foreign.ip' => 'self.ip', 'foreign.vlan' => 'self.vlan' }, | ||||
|     { cascade_copy => 0, cascade_update => 0, cascade_delete => 0 } | ||||
| ); | ||||
|  | ||||
| =head2 port_vlans_native | ||||
| @@ -65,6 +66,7 @@ Link relationship to support C<native_ports>, see below. | ||||
|  | ||||
| __PACKAGE__->has_many( port_vlans_native => 'App::Netdisco::DB::Result::Virtual::DevicePortVlanNative', | ||||
|     { 'foreign.ip' => 'self.ip', 'foreign.vlan' => 'self.vlan' }, | ||||
|     { cascade_copy => 0, cascade_update => 0, cascade_delete => 0 } | ||||
| ); | ||||
|  | ||||
| =head2 tagging_ports | ||||
|   | ||||
| @@ -40,7 +40,8 @@ __PACKAGE__->set_primary_key("username"); | ||||
| # Created by DBIx::Class::Schema::Loader v0.07015 @ 2012-01-07 14:20:02 | ||||
| # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2awpSJkzXP7+8eyT4vGjfw | ||||
|  | ||||
| __PACKAGE__->has_many( roles => 'App::Netdisco::DB::Result::Virtual::UserRole', 'username' ); | ||||
| __PACKAGE__->has_many( roles => 'App::Netdisco::DB::Result::Virtual::UserRole', | ||||
|   'username', { cascade_copy => 0, cascade_update => 0, cascade_delete => 0 } ); | ||||
|  | ||||
| # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||||
| 1; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user