Skip to content

Collection

blackline.models.collection

Column

Bases: BaseModel

Column object for a table.

Parameters:

Name Type Description Default
name str required
data_type Optional[str] None
nullable bool required
unique bool required
primary_key bool required
foreign_key bool required
check Optional[str] None
default Optional[str] None
Source code in BAR /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/blackline/models/collection.py
class Column(BaseModel):
    """
    Column object for a table.
    """

    name: str = Field(..., discription="The name of the column.")
    data_type: Optional[str] = Field(discription="The data type of the column.")
    nullable: bool = Field(True, discription="Whether the column is nullable.")
    unique: bool = Field(False, discription="Whether the column is unique.")
    primary_key: bool = Field(
        False, discription="Whether the column is the primary key."
    )
    foreign_key: bool = Field(False, discription="Whether the column is a foreign key.")
    check: Optional[str] = Field(discription="The check expression for the column.")
    default: Optional[str] = Field(discription="The default value for the column.")