db\Command addColumn()

addColumn() public method

Creates a SQL command for adding a new DB column.

public $this addColumn ( $table, $column, $type )
$table string

The table that the new column will be added to. The table name will be properly quoted by the method.

$column string

The name of the new column. The name will be properly quoted by the method.

$type string

The column type. yii\db\QueryBuilder::getColumnType() will be called to convert the give column type to the physical one. For example, string will be converted as varchar(255), and string not null becomes varchar(255) not null.

return $this

The command object itself

doc_Yii
2016-10-30 16:57:19
Comments
Leave a Comment

Please login to continue.