@@ -910,16 +910,10 @@ public function installSchema(array $request)
910
910
$ this ->assertDbAccessible ();
911
911
$ setup = $ this ->setupFactory ->create ($ this ->context ->getResources ());
912
912
$ this ->setupModuleRegistry ($ setup );
913
-
914
- $ this ->disableRestrictFKOnNonStandardKey ($ setup );
915
-
916
913
$ this ->setupCoreTables ($ setup );
917
914
$ this ->cleanMemoryTables ($ setup );
918
915
$ this ->log ->logMeta ('Schema creation/updates: ' );
919
916
$ this ->declarativeInstallSchema ($ request );
920
-
921
- $ this ->revertRestrictFKOnNonStandardKey ($ setup );
922
-
923
917
$ this ->handleDBSchemaData ($ setup , 'schema ' , $ request );
924
918
/** @var Mysql $adapter */
925
919
$ adapter = $ setup ->getConnection ();
@@ -1833,31 +1827,4 @@ private function setIndexerModeSchedule(): void
1833
1827
$ this ->log ->log (__ ("We couldn't change indexer(s)' mode because of an error: " .$ e ->getMessage ()));
1834
1828
}
1835
1829
}
1836
-
1837
- /***
1838
- * use of non-unique or partial keys as foreign keys is deprecated in MySQL8.4
1839
- *
1840
- * @param $setup
1841
- * @return void
1842
- */
1843
- private function disableRestrictFKOnNonStandardKey ($ setup ): void
1844
- {
1845
- $ setup ->getConnection ()->query ("
1846
- SET @OLD_RESTRICT_FK_ON_NON_STANDARD_KEY=@@GLOBAL.RESTRICT_FK_ON_NON_STANDARD_KEY,
1847
- @@GLOBAL.RESTRICT_FK_ON_NON_STANDARD_KEY=0
1848
- " );
1849
- }
1850
-
1851
- /***
1852
- * revert RESTRICT_FK_ON_NON_STANDARD_KEY to previous saved db value
1853
- *
1854
- * @param $setup
1855
- * @return void
1856
- */
1857
- private function revertRestrictFKOnNonStandardKey ($ setup ): void
1858
- {
1859
- // $setup->getConnection()->query("
1860
- // SET @@GLOBAL.RESTRICT_FK_ON_NON_STANDARD_KEY=IF(@OLD_RESTRICT_FK_ON_NON_STANDARD_KEY=0, 0, 1)"
1861
- // );
1862
- }
1863
1830
}
0 commit comments