summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/schema.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/schema.py')
-rw-r--r--lib/sqlalchemy/testing/schema.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/schema.py b/lib/sqlalchemy/testing/schema.py
index 5dfdc0e07..ad233ec22 100644
--- a/lib/sqlalchemy/testing/schema.py
+++ b/lib/sqlalchemy/testing/schema.py
@@ -7,6 +7,7 @@ __all__ = 'Table', 'Column',
table_options = {}
+
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
@@ -76,10 +77,10 @@ def Column(*args, **kw):
event.listen(col, 'after_parent_attach', add_seq, propagate=True)
return col
+
def _truncate_name(dialect, name):
if len(name) > dialect.max_identifier_length:
return name[0:max(dialect.max_identifier_length - 6, 0)] + \
"_" + hex(hash(name) % 64)[2:]
else:
return name
-