summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/schema.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-09-23 12:08:40 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-09-23 12:08:40 -0400
commit8e219c56614b787592887aa9097d83f0f210e695 (patch)
treef6bb19d5981500bd3d6fd07ee74bd01981f30625 /lib/sqlalchemy/sql/schema.py
parent08430e689f1a0190f671636016b12ff2ca08531f (diff)
downloadsqlalchemy-8e219c56614b787592887aa9097d83f0f210e695.tar.gz
Add table / column comments into tometadata()
Fixed bug in new SQL comments feature where table and column comment would not be copied when using :meth:`.Table.tometadata`. Change-Id: Ib3112e5e02930245daacb36c8ed38c01fa3e7dbd Fixes: #4087
Diffstat (limited to 'lib/sqlalchemy/sql/schema.py')
-rw-r--r--lib/sqlalchemy/sql/schema.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index 7a78a715f..446d0118b 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -865,6 +865,7 @@ class Table(DialectKWArgs, SchemaItem, TableClause):
args.append(c.copy(schema=schema))
table = Table(
name, metadata, schema=schema,
+ comment=self.comment,
*args, **self.kwargs
)
for c in self.constraints:
@@ -1433,6 +1434,7 @@ class Column(SchemaItem, ColumnClause):
onupdate=self.onupdate,
server_onupdate=self.server_onupdate,
doc=self.doc,
+ comment=self.comment,
*args
)
return self._schema_item_copy(c)