summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2018-04-11 09:29:00 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2018-04-11 12:16:23 -0400
commit9d5e117f6fcc38d8773bc943c615888dc8a3a819 (patch)
treec81ed463fb3860e6e83eb765cda56f321153030c /lib/sqlalchemy/dialects
parent5abeee69e34d45796cdff0770f58f9104da74701 (diff)
downloadsqlalchemy-9d5e117f6fcc38d8773bc943c615888dc8a3a819.tar.gz
Correct join for FKs with schema in SQL Server
Fixed 1.2 regression caused by :ticket:`4060` where the query used to reflect SQL Server cross-schema foreign keys was limiting the criteria incorrectly. Additionally, added some rework of the inter-schema reflection tests so that MySQL, MSSQL can be included, breaking out some of the Postgresql-specific behaviors into separate requirements. Fixes: #4234 Change-Id: I20c8e70707075f1767b79127c2c27d4b313c6515
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r--lib/sqlalchemy/dialects/mssql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py
index 840c355dc..f55f7e74d 100644
--- a/lib/sqlalchemy/dialects/mssql/base.py
+++ b/lib/sqlalchemy/dialects/mssql/base.py
@@ -2241,7 +2241,7 @@ class MSDialect(default.DefaultDialect):
RR.c.delete_rule],
sql.and_(C.c.table_name == tablename,
C.c.table_schema == owner,
- R.c.table_schema == C.c.table_schema,
+ RR.c.constraint_schema == C.c.table_schema,
C.c.constraint_name == RR.c.constraint_name,
R.c.constraint_name ==
RR.c.unique_constraint_name,