diff --git a/lib/NGCP/Schema/Result/cdr.pm b/lib/NGCP/Schema/Result/cdr.pm index b60d6f65..3775e7b8 100644 --- a/lib/NGCP/Schema/Result/cdr.pm +++ b/lib/NGCP/Schema/Result/cdr.pm @@ -304,6 +304,18 @@ __PACKAGE__->belongs_to( { cascade_copy => 0, cascade_delete => 0, join_type => 'left' } ); +__PACKAGE__->belongs_to( + "destination_account", + "NGCP::Schema::Result::contracts", + { "id" => "destination_account_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "UPDATE", + }, +); + __PACKAGE__->belongs_to( "destination_subscriber", "NGCP::Schema::Result::voip_subscribers", diff --git a/lib/NGCP/Schema/Result/v_time_periods_ical.pm b/lib/NGCP/Schema/Result/v_time_periods_ical.pm old mode 100755 new mode 100644