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

Support for COMMENT #148

Closed
Baysul opened this issue Jun 30, 2019 · 4 comments
Closed

Support for COMMENT #148

Baysul opened this issue Jun 30, 2019 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Baysul
Copy link

Baysul commented Jun 30, 2019

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Make it so the description parameter is used to COMMENT on columns when Tortoise.generate_schemas is called, or have a separate field entirely named comment. For tables, I'm not sure what the best solution would be, maybe a metadata field?

Describe alternatives you've considered
Issuing the COMMENT commands manually.

@grigi
Copy link
Member

grigi commented Jul 1, 2019

Thank you for the issue report.
We just added a description="..." parameter to all fields, and we can use it to omit COMMENT '...' when generating DDL.

This actually should be quite easy to do :-)
I confirmed all our supported databases support that syntax. The only "consideration" is that we need to handle basic escaping (at least we don't deal with user input here)

@grigi grigi added enhancement New feature or request good first issue Good for newcomers labels Jul 1, 2019
@harshanarayana
Copy link
Contributor

@grigi Can I pick this one up?

@grigi
Copy link
Member

grigi commented Jul 2, 2019

Sure!

@grigi
Copy link
Member

grigi commented Jul 5, 2019

Thanks to @harshanarayana we have initial support for this in v0.12.3 \o/

@grigi grigi closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants