summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/naming.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-07-14 21:11:16 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-07-14 21:11:51 -0400
commitdbc8bbfba3591d2ea704673d90e95014765d0f10 (patch)
tree274df91b7f0217d8bff7b8d9f3e6e4d6bd6365a0 /lib/sqlalchemy/sql/naming.py
parentd2193f53c10d29a7a9b1846ebf322fbced55041f (diff)
downloadsqlalchemy-dbc8bbfba3591d2ea704673d90e95014765d0f10.tar.gz
- allow the compilation rule that gets the formatted name
to again have the chance to veto rendering, as the naming convention can make the decision that the name is "none" or not now.
Diffstat (limited to 'lib/sqlalchemy/sql/naming.py')
-rw-r--r--lib/sqlalchemy/sql/naming.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/naming.py b/lib/sqlalchemy/sql/naming.py
index bb838c542..eb017eb25 100644
--- a/lib/sqlalchemy/sql/naming.py
+++ b/lib/sqlalchemy/sql/naming.py
@@ -155,6 +155,8 @@ def _constraint_name_for_table(const, table):
convention % ConventionDict(const, table,
metadata.naming_convention)
)
+ elif isinstance(convention, _defer_none_name):
+ return None
@event.listens_for(Constraint, "after_parent_attach")
@event.listens_for(Index, "after_parent_attach")