Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
flyly0755 opened this issue Oct 15, 2021 · 1 comment
Closed

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

flyly0755 opened this issue Oct 15, 2021 · 1 comment

Comments

@flyly0755
Copy link

flyly0755 commented Oct 15, 2021

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
xzkostyan added a commit that referenced this issue Jul 4, 2022
xzkostyan added a commit that referenced this issue Jul 5, 2022
xzkostyan added a commit that referenced this issue Jul 5, 2022
@xzkostyan
Copy link
Owner

Table and columns comments support was added to latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants