diff options
Diffstat (limited to 'lib/sqlalchemy/testing/schema.py')
-rw-r--r-- | lib/sqlalchemy/testing/schema.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/schema.py b/lib/sqlalchemy/testing/schema.py index 805c8e567..5dfdc0e07 100644 --- a/lib/sqlalchemy/testing/schema.py +++ b/lib/sqlalchemy/testing/schema.py @@ -60,6 +60,9 @@ def Column(*args, **kw): test_opts = dict([(k, kw.pop(k)) for k in kw.keys() if k.startswith('test_')]) + if not config.requirements.foreign_key_ddl.enabled: + args = [arg for arg in args if not isinstance(arg, schema.ForeignKey)] + col = schema.Column(*args, **kw) if 'test_needs_autoincrement' in test_opts and \ kw.get('primary_key', False) and \ |