]> git.joonet.de Git - adminer.git/commitdiff
MS SQL: Foreign keys in non-default schema (bug #833)
authorJakub Vrana <jakub@vrana.cz>
Wed, 19 Feb 2025 13:34:11 +0000 (14:34 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 19 Feb 2025 13:36:54 +0000 (14:36 +0100)
adminer/drivers/mssql.inc.php
changes.txt

index 0f042199ea80960b1293650d5df409aaa469ddd8..06288231abd0f445f05c4f6372a6bbb725725987 100644 (file)
@@ -546,7 +546,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
 
        function foreign_keys($table) {
                $return = array();
-               foreach (get_rows("EXEC sp_fkeys @fktable_name = " . q($table)) as $row) {
+               foreach (get_rows("EXEC sp_fkeys @fktable_name = " . q($table) . ", @fktable_owner = " . q(get_schema())) as $row) {
                        $foreign_key = &$return[$row["FK_NAME"]];
                        $foreign_key["db"] = $row["PKTABLE_QUALIFIER"];
                        $foreign_key["table"] = $row["PKTABLE_NAME"];
index c4f3746fcd4656c722ccc675040f90485f9ea3f0..ebbf6140ff03cd07444f36085cdd99a5da9a3627 100644 (file)
@@ -1,5 +1,6 @@
 Adminer 4.16.0-dev:
 PostgreSQL: Preserve whitespace in EXPLAIN (bug #827)
+MS SQL: Foreign keys in non-default schema (bug #833)
 Oracle: Include tables granted by other user
 MongoDB: Execute commands against the selected DB