summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-01-20 21:00:08 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-01-20 21:00:08 +0000
commitc95faa5e8d171160e0786c7e5b8064eb4fd524bb (patch)
tree59658a06ff1e520bc97563ca043bb615224cbefe /lib/sqlalchemy/databases/mysql.py
parent7838cb175913cc19ad3701a9de16ab16cdf0809f (diff)
downloadsqlalchemy-c95faa5e8d171160e0786c7e5b8064eb4fd524bb.tar.gz
- mysql table create options work on a generic passthru now, i.e. Table(..., mysql_engine='InnoDB',
mysql_collate="latin1_german2_ci", mysql_auto_increment="5", mysql_<somearg>...), helps [ticket:418]
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 0edcbc7bd..aee26a405 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -477,11 +477,12 @@ class MySQLSchemaGenerator(ansisql.ANSISchemaGenerator):
return colspec
def post_create_table(self, table):
- mysql_engine = table.kwargs.get('mysql_engine', None)
- if mysql_engine is not None:
- return " TYPE=%s" % mysql_engine
- else:
- return ""
+ args = ""
+ for k in table.kwargs:
+ if k.startswith('mysql_'):
+ opt = k[6:]
+ args += " %s=%s" % (opt.upper(), table.kwargs[k])
+ return args
class MySQLSchemaDropper(ansisql.ANSISchemaDropper):
def visit_index(self, index):