Specifies generation strategy if this column will use auto increment.
rowid option supported only in CockroachDB.
isArray
isArray:boolean
Indicates if column stores array.
isGenerated
isGenerated:boolean
Indicates if column is auto-generated sequence.
isNullable
isNullable:boolean
Indicates if column is NULL, or is NOT NULL in the database.
isPrimary
isPrimary:boolean
Indicates if column is a primary key.
isUnique
isUnique:boolean
Indicates if column has unique value.
length
length:string
Column type's length. Used only on some column types.
For example type = "string" and length = "100" means that ORM will create a column with type varchar(100).
name
name:string
Column name.
可选onUpdate
onUpdate?:string
ON UPDATE trigger. Works only for MySQL.
可选precision
precision?:null|number
The precision for a decimal (exact numeric) column (applies only for decimal column), which is the maximum
number of digits that are stored for the values.
可选primaryKeyConstraintName
primaryKeyConstraintName?:string
Name of the primary key constraint for primary column.
可选scale
scale?:number
The scale for a decimal (exact numeric) column (applies only for decimal column), which represents the number
of digits to the right of the decimal point and must not be greater than precision.
可选spatialFeatureType
spatialFeatureType?:string
Spatial Feature Type (Geometry, Point, Polygon, etc.)
可选srid
srid?:number
SRID (Spatial Reference ID (EPSG code))
type
type:string
Column type.
unsigned
unsigned:boolean
Puts UNSIGNED attribute on to numeric column. Works only for MySQL.
可选width
width?:number
Column type's display width. Used only on some column types in MySQL.
For example, INT(4) specifies an INT with a display width of four digits.
zerofill
zerofill:boolean
Puts ZEROFILL attribute on to numeric column. Works only for MySQL.
If you specify ZEROFILL for a numeric column, MySQL automatically adds the UNSIGNED attribute to the column
Table's columns in the database represented in this class.