Optionalaftermariadb, mysql, snowflake and ibmi only
OptionalallowOptionalautoOptionalautoOptionalcolumnOptionalcommentOptionaldefaultOptionalfieldThe name of the column. attributeToSql needs it to build CHECK constraints, foreign key
constraint names and column comments.
Optionalfirstmariadb, mysql, snowflake and ibmi only
OptionalinitialOptionalModelThe model the column belongs to, when it comes from one. mssql and oracle read it to detect a column that references its own table.
OptionalonOptionalonOptionalprimaryOptionalreferencesOptionalunique
The column definition accepted by
attributeToSql.This is deliberately wider than NormalizedAttributeOptions: the same methods are also called with the output of
describeTable, wheretypeis a raw SQL string, and with hand-written definitions from migrations. Not every dialect honours every property.