summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-06-03 18:33:20 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-06-03 18:33:20 -0400
commitada19275299f0105f4aaed5bbe0d373ea33feea6 (patch)
treeeffc1e3d25f4c94512a19720dacbae1d8270f0d5 /lib/sqlalchemy
parent3a13047fb06d698e0440895281c484199e0a95a5 (diff)
downloadsqlalchemy-ada19275299f0105f4aaed5bbe0d373ea33feea6.tar.gz
The ``deferrable`` keyword argument on :class:`.ForeignKey` and
:class:`.ForeignKeyConstraint` will not render the ``DEFERRABLE`` keyword on the MySQL dialect. For a long time we left this in place because a non-deferrable foreign key would act very differently than a deferrable one, but some environments just disable FKs on MySQL, so we'll be less opinionated here. [ticket:2721]
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/dialects/mysql/base.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index ad4650f6d..03827edb7 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -1567,6 +1567,8 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
(self.preparer.format_table(constraint.table),
qual, const)
+ def define_constraint_deferrability(self, constraint):
+ return ""
class MySQLTypeCompiler(compiler.GenericTypeCompiler):
def _extend_numeric(self, type_, spec):