diff --git a/libraries/classes/Controllers/Table/RelationController.php b/libraries/classes/Controllers/Table/RelationController.php
index 45ca719265..2977241c50 100644
--- a/libraries/classes/Controllers/Table/RelationController.php
+++ b/libraries/classes/Controllers/Table/RelationController.php
@@ -172,7 +172,6 @@ final class RelationController extends AbstractController
// common form
$engine = $this->dbi->getTable($this->db, $this->table)->getStorageEngine();
- $foreignKeySupported = Util::isForeignKeySupported($storageEngine);
$this->render('table/relation/common_form', [
'is_foreign_key_supported' => Util::isForeignKeySupported($engine),
'db' => $this->db,
@@ -191,9 +190,6 @@ final class RelationController extends AbstractController
'databases' => $GLOBALS['dblist']->databases,
'dbi' => $this->dbi,
'default_sliders_state' => $GLOBALS['cfg']['InitialSlidersState'],
- 'foreignKeySupported' => $foreignKeySupported,
- 'indexes' => $foreignKeySupported ? Index::getFromTable($this->table, $this->db) : null,
- 'indexes_duplicates' => $foreignKeySupported ? Index::findDuplicates($this->table, $this->db) : null,
'route' => $route,
]);
}
diff --git a/templates/table/relation/common_form.twig b/templates/table/relation/common_form.twig
index accd923ec3..e11e0c958c 100644
--- a/templates/table/relation/common_form.twig
+++ b/templates/table/relation/common_form.twig
@@ -216,109 +216,4 @@
-{% if foreignKeySupported %}
-
-
-
-
-
-{% endif %}
-
{% endblock %}
diff --git a/test/classes/Controllers/Table/RelationControllerTest.php b/test/classes/Controllers/Table/RelationControllerTest.php
index ebc20b0d60..98f7db225e 100644
--- a/test/classes/Controllers/Table/RelationControllerTest.php
+++ b/test/classes/Controllers/Table/RelationControllerTest.php
@@ -60,28 +60,9 @@ class RelationControllerTest extends AbstractTestCase
}
};
- $indexes = [
- [
- 'Schema' => 'Schema1',
- 'Key_name' => 'Key_name1',
- 'Column_name' => 'Column_name1',
- ],
- [
- 'Schema' => 'Schema2',
- 'Key_name' => 'Key_name2',
- 'Column_name' => 'Column_name2',
- ],
- [
- 'Schema' => 'Schema3',
- 'Key_name' => 'Key_name3',
- 'Column_name' => 'Column_name3',
- ],
- ];
$dbi = $this->getMockBuilder(DatabaseInterface::class)
->disableOriginalConstructor()
->getMock();
- $dbi->expects($this->any())->method('getTableIndexes')
- ->will($this->returnValue($indexes));
$GLOBALS['dbi'] = $dbi;
diff --git a/test/classes/Controllers/Table/StructureControllerTest.php b/test/classes/Controllers/Table/StructureControllerTest.php
index 437a34c3eb..4ae8ff8259 100644
--- a/test/classes/Controllers/Table/StructureControllerTest.php
+++ b/test/classes/Controllers/Table/StructureControllerTest.php
@@ -51,6 +51,24 @@ class StructureControllerTest extends AbstractTestCase
$GLOBALS['cfg']['Server']['user'] = 'pma_user';
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
+ $indexes = [
+ [
+ 'Schema' => 'Schema1',
+ 'Key_name' => 'Key_name1',
+ 'Column_name' => 'Column_name1',
+ ],
+ [
+ 'Schema' => 'Schema2',
+ 'Key_name' => 'Key_name2',
+ 'Column_name' => 'Column_name2',
+ ],
+ [
+ 'Schema' => 'Schema3',
+ 'Key_name' => 'Key_name3',
+ 'Column_name' => 'Column_name3',
+ ],
+ ];
+
$table = $this->getMockBuilder(Table::class)
->disableOriginalConstructor()
->getMock();
@@ -60,6 +78,8 @@ class StructureControllerTest extends AbstractTestCase
->getMock();
$dbi->expects($this->any())->method('getTable')
->will($this->returnValue($table));
+ $dbi->expects($this->any())->method('getTableIndexes')
+ ->will($this->returnValue($indexes));
$GLOBALS['dbi'] = $dbi;