-
Notifications
You must be signed in to change notification settings - Fork 18
apimigrationchangecolumn
Troy Murray edited this page Sep 19, 2011
·
2 revisions
Change a column definition for an existing column in a table.
changeColumn(table,columnName,columnType[,referenceName,default,null,limit,precision,scale,addColumns]);| Parameter | Type | Required | Default | Description |
| table | string | Yes | Existing table name found in the database | |
| columnName | string | Yes | Existing column name to change | |
| columnType | string | Yes | New type for the column | |
| referenceName | string | No | Name for new reference column, required if columnType is 'reference' | |
| default | string | No | Default value for column | |
| null | boolean | No | Specifies if nulls are allowed in this column | |
| limit | integer | No | Character limit or integer size for column | |
| precision | integer | No | Used for decimal columns to specify the number of digits the column can hold | |
| scale | integer | No | number of digits that can be placed to the right of the decimal point | |
| addColumns | boolean | No | False | If set to 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);