Relax foreign keys format for NDB engine
This commit is contained in:
parent
001bf042b4
commit
594c626665
|
@ -505,7 +505,7 @@ if (!defined("DRIVER")) {
|
||||||
$return = array();
|
$return = array();
|
||||||
$create_table = $connection->result("SHOW CREATE TABLE " . table($table), 1);
|
$create_table = $connection->result("SHOW CREATE TABLE " . table($table), 1);
|
||||||
if ($create_table) {
|
if ($create_table) {
|
||||||
preg_match_all("~CONSTRAINT ($pattern) FOREIGN KEY \\(((?:$pattern,? ?)+)\\) REFERENCES ($pattern)(?:\\.($pattern))? \\(((?:$pattern,? ?)+)\\)(?: ON DELETE ($on_actions))?(?: ON UPDATE ($on_actions))?~", $create_table, $matches, PREG_SET_ORDER);
|
preg_match_all("~CONSTRAINT ($pattern) FOREIGN KEY ?\\(((?:$pattern,? ?)+)\\) REFERENCES ($pattern)(?:\\.($pattern))? \\(((?:$pattern,? ?)+)\\)(?: ON DELETE ($on_actions))?(?: ON UPDATE ($on_actions))?~", $create_table, $matches, PREG_SET_ORDER);
|
||||||
foreach ($matches as $match) {
|
foreach ($matches as $match) {
|
||||||
preg_match_all("~$pattern~", $match[2], $source);
|
preg_match_all("~$pattern~", $match[2], $source);
|
||||||
preg_match_all("~$pattern~", $match[5], $target);
|
preg_match_all("~$pattern~", $match[5], $target);
|
||||||
|
|
Loading…
Reference in a new issue