diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NcsLastCommentName.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NcsLastCommentName.php
index 6287811f6f04ef275343aa533709aac040f16ee9..e515c1de38ad43501b732aca2052beab0fe53cc2 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NcsLastCommentName.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NcsLastCommentName.php
@@ -40,7 +40,6 @@ public function query() {
     $join = drupal_container()->get('plugin.manager.views.join')->createInstance('standard', $definition);
 
     // ncs_user alias so this can work with the sort handler, below.
-//    $this->user_table = $this->query->add_relationship(NULL, $join, 'users', $this->relationship);
     $this->user_table = $this->query->ensure_table('ncs_users', $this->relationship, $join);
 
     $this->field_alias = $this->query->add_field(NULL, "COALESCE($this->user_table.name, $this->tableAlias.$this->field)", $this->tableAlias . '_' . $this->field);
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/NcsLastCommentName.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/NcsLastCommentName.php
index 9e2c70e49c56f52cb14040de95123b2202675e72..78aa9bff71985c87be70094ac5ca3d1b0440e731 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/NcsLastCommentName.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/NcsLastCommentName.php
@@ -33,7 +33,6 @@ public function query() {
     // @todo this might be safer if we had an ensure_relationship rather than guessing
     // the table alias. Though if we did that we'd be guessing the relationship name
     // so that doesn't matter that much.
-//    $this->user_table = $this->query->add_relationship(NULL, $join, 'users', $this->relationship);
     $this->user_table = $this->query->ensure_table('ncs_users', $this->relationship, $join);
     $this->user_field = $this->query->add_field($this->user_table, 'name');
 
diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/relationship/EntityReverse.php b/core/modules/field/lib/Drupal/field/Plugin/views/relationship/EntityReverse.php
index 02ee8e97bcbf5d9c2fc4b74778aaf74a4e5f8fca..481105fd735874cbc07260dc694f4923574917d6 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/views/relationship/EntityReverse.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/views/relationship/EntityReverse.php
@@ -93,7 +93,7 @@ public function query() {
     // use a short alias for this:
     $alias = $this->definition['field_name'] . '_' . $this->table;
 
-    $this->alias = $this->query->add_relationship($alias, $second_join, $this->definition['base'], $this->relationship);
+    $this->alias = $this->query->addRelationship($alias, $second_join, $this->definition['base'], $this->relationship);
   }
 
 }
diff --git a/core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php b/core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php
index 6d73cbce7f1284a5ab5e969089a8dff1473a667a..14a26674361b4a09772042fd5a01374d334bcd8f 100644
--- a/core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php
+++ b/core/modules/search/lib/Drupal/search/Plugin/views/argument/Search.php
@@ -66,7 +66,7 @@ public function query($group_by = FALSE) {
         'left_field' => 'word',
       );
       $join = drupal_container()->get('plugin.manager.views.join')->createInstance('standard', $definition);
-      $search_total = $this->query->add_relationship('search_total', $join, $search_index);
+      $search_total = $this->query->addRelationship('search_total', $join, $search_index);
 
       $this->search_score = $this->query->add_field('', "SUM($search_index.score * $search_total.count)", 'score', array('aggregate' => TRUE));
 
diff --git a/core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php b/core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php
index fa4606644cfc515f82fba67ac2898568ea5750c2..da0c747d3eb79cb9a9486d65250102bf0053dbeb 100644
--- a/core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php
+++ b/core/modules/search/lib/Drupal/search/Plugin/views/filter/Search.php
@@ -147,7 +147,7 @@ public function query() {
       );
       $join = drupal_container()->get('plugin.manager.views.join')->createInstance('standard', $definition);
 
-      $search_total = $this->query->add_relationship('search_total', $join, $search_index);
+      $search_total = $this->query->addRelationship('search_total', $join, $search_index);
 
       $this->search_score = $this->query->add_field('', "SUM($search_index.score * $search_total.count)", 'score', array('aggregate' => TRUE));
 
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
index dd52645471585ba855f6425a53c9f52f6ac1b450..cdb23a95e7415add2c0c71dd8dbe3477bd983135 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/relationship/NodeTermData.php
@@ -100,7 +100,7 @@ public function query() {
     // use a short alias for this:
     $alias = $def['table'] . '_' . $this->table;
 
-    $this->alias = $this->query->add_relationship($alias, $join, 'taxonomy_term_data', $this->relationship);
+    $this->alias = $this->query->addRelationship($alias, $join, 'taxonomy_term_data', $this->relationship);
   }
 
 }
diff --git a/core/modules/views/lib/Drupal/views/ManyToOneHelper.php b/core/modules/views/lib/Drupal/views/ManyToOneHelper.php
index ed60500fac018d4e0a31abafb9528fe9aa45b3ce..caca5914dff51458ef49e6784f8525b4130073da 100644
--- a/core/modules/views/lib/Drupal/views/ManyToOneHelper.php
+++ b/core/modules/views/lib/Drupal/views/ManyToOneHelper.php
@@ -93,7 +93,7 @@ public function addTable($join = NULL, $alias = NULL) {
     }
     // If we found that there are tables in between, add the relationship.
     if ($r_join->table != $join->table) {
-      $relationship = $this->handler->query->add_relationship($this->handler->table . '_' . $r_join->table, $r_join, $r_join->table, $this->handler->relationship);
+      $relationship = $this->handler->query->addRelationship($this->handler->table . '_' . $r_join->table, $r_join, $r_join->table, $this->handler->relationship);
     }
 
     // And now add our table, using the new relationship if one was used.
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
index 7555ff47f471bf1820b50b2a6bee0754da3d14bd..b5954b57019d4bed6302fc0130654b4e5e5939f7 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
@@ -290,7 +290,7 @@ public function submitOptionsForm(&$form, &$form_state) {
    *   might have a relationship to an 'album' node, which might
    *   have a relationship to an 'artist' node.
    */
-  function add_relationship($alias, JoinPluginBase $join, $base, $link_point = NULL) {
+  public function addRelationship($alias, JoinPluginBase $join, $base, $link_point = NULL) {
     if (empty($link_point)) {
       $link_point = $this->view->storage->get('base_table');
     }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
index b685dedf69abf24c27215a6b996480a074f01f67..6f8f2f09c2f8bdba7327eba9a32c592d8671a972 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
@@ -383,7 +383,7 @@ public function query() {
     // use a short alias for this:
     $alias = $def['table'] . '_' . $this->table;
 
-    $this->alias = $this->query->add_relationship($alias, $join, $this->definition['base'], $this->relationship);
+    $this->alias = $this->query->addRelationship($alias, $join, $this->definition['base'], $this->relationship);
   }
 
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php
index 89735a0c789a4eb541836a2ce4b5339bbf4d1383..d2f566044701c5c78dff34355b5b02022c78324d 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php
@@ -135,7 +135,7 @@ public function query() {
     // use a short alias for this:
     $alias = $def['table'] . '_' . $this->table;
 
-    $this->alias = $this->query->add_relationship($alias, $join, $this->definition['base'], $this->relationship);
+    $this->alias = $this->query->addRelationship($alias, $join, $this->definition['base'], $this->relationship);
 
     // Add access tags if the base table provide it.
     if (empty($this->query->options['disable_sql_rewrite']) && isset($table_data['table']['base']['access query tag'])) {