From e9a9ecdd2a771396f6335fd723f7c1cc4b85bc8f Mon Sep 17 00:00:00 2001 From: Cyrill Schumacher Date: Sat, 26 Apr 2014 16:33:16 +1000 Subject: [PATCH] This bugfix add a missing backtick to fix the $regExp for method getForeignKeys() to detect the schema name in a reference. --- lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php index de85b40366bd7..300ff23168846 100644 --- a/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php +++ b/lib/Magento/Framework/DB/Adapter/Pdo/Mysql.php @@ -1141,7 +1141,7 @@ public function getForeignKeys($tableName, $schemaName = null) // collect CONSTRAINT $regExp = '#,\s+CONSTRAINT `([^`]*)` FOREIGN KEY \(`([^`]*)`\) ' - . 'REFERENCES (`[^`]*\.)?`([^`]*)` \(`([^`]*)`\)' + . 'REFERENCES (`[^`]*`\.)?`([^`]*)` \(`([^`]*)`\)' . '( ON DELETE (RESTRICT|CASCADE|SET NULL|NO ACTION))?' . '( ON UPDATE (RESTRICT|CASCADE|SET NULL|NO ACTION))?#'; $matches = array();