Model::alterAddColumn
Execute Alter Add Column
Description
public void Model::alterAddColumn( string $field )
Arguments
Name | Data type | Default | Remarks |
---|---|---|---|
$field | string | Adding column name |
Example
Controller
$model = new Model(true, array(
'table' => 'cms_news',
));
// ALTER TABLE cms_news ADD news_id INTEGER NOT NULL
$model->alterAddColumn('news_id INTEGER NOT NULL');