diff options
author | Frazer McLean <frazer@frazermclean.co.uk> | 2016-06-13 10:31:18 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-06-13 10:31:18 -0400 |
commit | 84974cf09220105bc7a92e5bcde31f52827c1de7 (patch) | |
tree | 250677d68a0c6ba0070a97cd6cd3a7c2c2949c50 /lib/sqlalchemy/dialects/mysql | |
parent | 7189d0bc82598c2d6dcbb55b054837416db2ee7d (diff) | |
download | sqlalchemy-pr_github_284.tar.gz |
Comment supportpr_github_284
Implementation of [#1546 (BitBucket)](https://bitbucket.org/zzzeek/sqlalchemy/issues/1546).
Very unfinished but I have reflection and setting after table creation working for PostgreSQL.
If you're not opposed, perhaps best to continue discussion on Gerrit?
Change-Id: Ib90683850805a2b4ee198e420dc294f32f15d35d
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/284
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 5abb1f3d6..025737fde 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1093,6 +1093,15 @@ class MySQLDDLCompiler(compiler.DDLCompiler): "causes ON UPDATE/ON DELETE clauses to be ignored.") return "" + def visit_set_table_comment(self, create): + return "ALTER TABLE %s COMMENT '%s'" % ( + self.preparer.format_table(create.element), + create.element.comment + ) + + def visit_set_column_comment(self, create): + raise NotImplementedError + class MySQLTypeCompiler(compiler.GenericTypeCompiler): def _extend_numeric(self, type_, spec): |