summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/schema.py
diff options
context:
space:
mode:
authorFrazer McLean <frazer@frazermclean.co.uk>2016-06-13 10:31:18 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-06-13 10:31:18 -0400
commit84974cf09220105bc7a92e5bcde31f52827c1de7 (patch)
tree250677d68a0c6ba0070a97cd6cd3a7c2c2949c50 /lib/sqlalchemy/sql/schema.py
parent7189d0bc82598c2d6dcbb55b054837416db2ee7d (diff)
downloadsqlalchemy-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/sql/schema.py')
-rw-r--r--lib/sqlalchemy/sql/schema.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index cb01a49e3..ede9c7944 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -490,6 +490,7 @@ class Table(DialectKWArgs, SchemaItem, TableClause):
include_columns = kwargs.pop('include_columns', None)
self.implicit_returning = kwargs.pop('implicit_returning', True)
+ self.comment = kwargs.pop('comment', None)
if 'info' in kwargs:
self.info = kwargs.pop('info')
@@ -579,6 +580,9 @@ class Table(DialectKWArgs, SchemaItem, TableClause):
if 'info' in kwargs:
self.info = kwargs.pop('info')
+ if 'comment' in kwargs:
+ self.comment = kwargs.pop('comment')
+
if autoload:
if not autoload_replace:
exclude_columns = [c.name for c in self.c]
@@ -1176,6 +1180,7 @@ class Column(SchemaItem, ColumnClause):
self.autoincrement = kwargs.pop('autoincrement', "auto")
self.constraints = set()
self.foreign_keys = set()
+ self.comment = kwargs.pop('comment', None)
# check if this Column is proxying another column
if '_proxies' in kwargs: