]> git.joonet.de Git - adminer.git/commitdiff
MS SQL: Support foreign keys to other DB
authorJakub Vrana <jakub@vrana.cz>
Wed, 21 Aug 2019 12:33:12 +0000 (14:33 +0200)
committerJakub Vrana <jakub@vrana.cz>
Wed, 21 Aug 2019 12:33:17 +0000 (14:33 +0200)
adminer/drivers/mssql.inc.php
changes.txt

index 4a053c82bfac9ef28892b193b919c460392f378a..eba5dc5219d31aed24b26d0de8d5755bd57d246b 100644 (file)
@@ -542,6 +542,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
                $return = array();
                foreach (get_rows("EXEC sp_fkeys @fktable_name = " . q($table)) as $row) {
                        $foreign_key = &$return[$row["FK_NAME"]];
+                       $foreign_key["db"] = $row["PKTABLE_QUALIFIER"];
                        $foreign_key["table"] = $row["PKTABLE_NAME"];
                        $foreign_key["source"][] = $row["FKCOLUMN_NAME"];
                        $foreign_key["target"][] = $row["PKCOLUMN_NAME"];
index 4d0d172916beacd4d63255f67d96fe06d04aafef..73d4ca26aed67595469161a4c655b188ad3aab09 100644 (file)
@@ -6,6 +6,7 @@ SQLite: Quote strings stored in integer columns in export (bug #696)
 SQLite: Handle error in altering table (bug #697)
 SQLite: Allow setting auto increment for empty tables
 SQLite: Preserve auto increment when recreating table
+MS SQL: Support foreign keys to other DB
 
 Adminer 4.7.2 (released 2019-07-18):
 Do not attempt logging in without password (bug #676)