clickhouse-sqlalchemy icon indicating copy to clipboard operation
clickhouse-sqlalchemy copied to clipboard

Can't create comment of a table field with class map

Open flyly0755 opened this issue 3 years ago • 1 comments

Describe the bug with sql command to creat a table, we can use COMMENT attribute to set a comment for a field. CREATE TABLE stdfdb.NewTable2 ( Column4 String COMMENT 'TEST',

`Column5` String

) ENGINE = MergeTree() ORDER BY Column1 SETTINGS index_granularity = 8192

but with clickhouse-sqlalchemy classs map: class TbFile(Base, CommonDB2): tablename = 'tb_file' table_args = {'comment': 'File Info Table V1.0'} # id = Column(types.UUID, primary_key=True) filename = Column(types.String, primary_key=True) type = Column(types.String, comment='test it') table_args = ( engines.MergeTree(partition_by='filename', order_by='filename', primary_key='filename'), ) The comment function not works. after create table with ORM, we can't see the comment 'test it' with the field type To Reproduce See above

Expected behavior Can see the comment 'test it' with the field type

Versions

  • clickhouse-sqlalchemy0.1.6
  • Python3.8.5

flyly0755 avatar Oct 15 '21 03:10 flyly0755

Table and columns comments support was added to latest master.

xzkostyan avatar Jul 05 '22 18:07 xzkostyan