console\controllers\MigrateController $fields

$fields public property (available since version 2.0.7)

Column definition strings used for creating migration code.

The format of each definition is COLUMN_NAME:COLUMN_TYPE:COLUMN_DECORATOR. Delimiter is ,. For example, --fields="name:string(12):notNull:unique" produces a string column of size 12 which is not null and unique values.

Note: primary key is added automatically and is named id by default. If you want to use another name you may specify it explicitly like --fields="id_key:primaryKey,name:string(12):notNull:unique"

public array $fields = []
doc_Yii
2016-10-30 16:55:17
Comments
Leave a Comment

Please login to continue.