aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/tools
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/db/tools')
-rw-r--r--phpBB/phpbb/db/tools/mssql.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/tools/mssql.php b/phpBB/phpbb/db/tools/mssql.php
index 0dfb09b1ba..1e4d3aee2f 100644
--- a/phpBB/phpbb/db/tools/mssql.php
+++ b/phpBB/phpbb/db/tools/mssql.php
@@ -706,7 +706,8 @@ class mssql extends tools
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc
JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu ON tc.CONSTRAINT_NAME = ccu.Constraint_name
WHERE tc.TABLE_NAME = '{$table_name}'
- AND tc.CONSTRAINT_TYPE = 'Primary Key'";
+ AND tc.CONSTRAINT_TYPE = 'Primary Key'
+ AND ccu.COLUMN_NAME = '{$column_name}'";
$result = $this->db->sql_query($sql);