Builds and executes a SQL statement for adding a new DB column.
public addColumn ( string $table, string $column, string $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. The [[QueryBuilder::getColumnType()]] method will be invoked to convert abstract column type (if any) into the physical one. Anything that is not recognized as abstract type will be kept in the generated SQL. For example, 'string' will be turned into 'varchar(255)', while 'string not null' will become 'varchar(255) not null'. |