mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 00:54:08 +02:00
Foreign keys: Switch schema back after getting the tables
This commit is contained in:
@@ -550,7 +550,7 @@ function format_foreign_key($foreign_key) {
|
||||
return " FOREIGN KEY (" . implode(", ", array_map('idf_escape', $foreign_key["source"])) . ") REFERENCES "
|
||||
. ($db != "" && $db != $_GET["db"] ? idf_escape($db) . "." : "")
|
||||
. ($ns != "" && $ns != $_GET["ns"] ? idf_escape($ns) . "." : "")
|
||||
. table($foreign_key["table"])
|
||||
. idf_escape($foreign_key["table"])
|
||||
. " (" . implode(", ", array_map('idf_escape', $foreign_key["target"])) . ")" //! reuse $name - check in older MySQL versions
|
||||
. (preg_match("~^($on_actions)\$~", $foreign_key["on_delete"]) ? " ON DELETE $foreign_key[on_delete]" : "")
|
||||
. (preg_match("~^($on_actions)\$~", $foreign_key["on_update"]) ? " ON UPDATE $foreign_key[on_update]" : "")
|
||||
|
Reference in New Issue
Block a user