Skip to content

add comments on tables and columns, visible also on the generated DB #492

Closed
@AlekseyFedorovich

Description

@AlekseyFedorovich

First Check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the SQLModel documentation, with the integrated search.
  • I already searched in Google "How to X in SQLModel" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already checked if it is not related to SQLModel but to Pydantic.
  • I already checked if it is not related to SQLModel but to SQLAlchemy.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

from sqlmodel import Field, Relationship, SQLModel


class Measure(SQLModel, table=True):
    t: int         = Field(primary_key=True, description='Unix epoch when the measure was performed')

Description

I want to add comments on columns and tables that can be seen also in the generated SQL DB

No 'comment' parameter could be found in the 'Field' function. I found the 'description' parameter but it has no effect on the generated schema and I couldn't find any information on what's the use of this attribute.

Operating System

Windows

Operating System Details

No response

SQLModel Version

0.0.8

Python Version

3.7.3

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions