Return to v2.1 docs

changeColumn()


Migrator Migration Functions void migration


changes a column definition Only available in a migration CFC

Name Type Required Default Description
table string Yes The Name of the table where the column is
columnName string Yes THe name of the column
columnType string Yes The type of the column
afterColumn string No The name of the column which this column should be inserted after
referenceName string No Name for reference column, see documentation for references function, required if columnType is 'reference'
default string No Default value for this column
null boolean No Whether to allow NULL values
limit numeric No Character or integer size limit for column
precision numeric No (For decimal type) the maximum number of digits allow
scale numeric No (For decimal type) the number of digits to the right of the decimal point
addColumns boolean No false if true, attempts to add columns and database will likely throw an error if column already exists
changeColumn(table='members', columnType='string', columnName='status', limit=50);

Related Functions

Migration Functions