summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/provision.py
diff options
context:
space:
mode:
authorSean Dunn <sean.dunn@ihsmarkit.com>2018-06-29 10:26:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2018-06-29 10:52:47 -0400
commitca94ea8ab583f8ab366ee5971bfc1bdd96e54cc9 (patch)
treea32d239376d13586f8e16db4f123c7a6c6573962 /lib/sqlalchemy/testing/provision.py
parentb694a309e89e7c3e57e83dd10e9a75c66672c396 (diff)
downloadsqlalchemy-ca94ea8ab583f8ab366ee5971bfc1bdd96e54cc9.tar.gz
Add unique_constraint_name to MSSQL FK reflection
Fixed bug in MSSQL reflection where when two same-named tables in different schemas had same-named primary key constraints, foreign key constraints referring to one of the tables would have their columns doubled, causing errors. Pull request courtesy Sean Dunn. Fixes: #4228 Change-Id: I7dabaaee0944e1030048826ba39fc574b0d63031 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/457
Diffstat (limited to 'lib/sqlalchemy/testing/provision.py')
-rw-r--r--lib/sqlalchemy/testing/provision.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py
index 8abfa3301..4c749d382 100644
--- a/lib/sqlalchemy/testing/provision.py
+++ b/lib/sqlalchemy/testing/provision.py
@@ -369,6 +369,7 @@ def _mssql_create_db(cfg, eng, ident):
"ALTER DATABASE %s SET READ_COMMITTED_SNAPSHOT ON" % ident)
conn.execute("use %s" % ident)
conn.execute("create schema test_schema")
+ conn.execute("create schema test_schema_2")
@_drop_db.for_db("mssql")