diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-12-06 19:51:10 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-12-06 19:51:10 +0000 |
commit | f9cb6f5834fb1acf4460fd9bb6b72f8c76f8c36c (patch) | |
tree | d2ec1ec2f53858f927db3059cc0cf9ba6a8034d5 /lib/sqlalchemy/dialects/mysql/base.py | |
parent | 4ca12d76bd8580d56c4ec1f7ed95c0e37a4c281a (diff) | |
download | sqlalchemy-f9cb6f5834fb1acf4460fd9bb6b72f8c76f8c36c.tar.gz |
- reworked the DDL generation of ENUM and similar to be more platform agnostic.
Uses a straight CheckConstraint with a generic expression. Preparing for boolean
constraint in [ticket:1589]
- CheckConstraint now accepts SQL expressions, though support for quoting of values
will be very limited. we don't want to get into formatting dates and such.
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index d5ee4f5bb..3a2773892 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1354,12 +1354,6 @@ class MySQLDDLCompiler(compiler.DDLCompiler): return ' '.join(colspec) - def visit_enum_constraint(self, constraint): - if not constraint.type.native_enum: - return super(MySQLDDLCompiler, self).visit_enum_constraint(constraint) - else: - return None - def post_create_table(self, table): """Build table-level CREATE options like ENGINE and COLLATE.""" @@ -1661,6 +1655,9 @@ class MySQLDialect(default.DefaultDialect): # identifiers are 64, however aliases can be 255... max_identifier_length = 255 + supports_native_enum = True + supports_native_boolean = True + supports_sane_rowcount = True supports_sane_multi_rowcount = False |