public function alterColumn($table, $column, $type)
    {
        $promises = [];
        $promises[] = $this->createCommand()->alterColumn($table, $column, $type)->execute();
        if ($type instanceof ColumnSchemaBuilder && $type->comment !== null) {
            $promises[] = $this->createCommand()->addCommentOnColumn($table, $column, $type->comment)->execute();
        }
        return $this->execPromise($promises, "alter column $column in table $table to $type");
    }
public function alterColumn($table, $column, $type)
    {
        $promises = [];
        $promises[] = $this->createCommand()->alterColumn($table, $column, $type)->execute();
        if ($type instanceof ColumnSchemaBuilder && $type->comment !== null) {
            $promises[] = $this->createCommand()->addCommentOnColumn($table, $column, $type->comment)->execute();
        }
        return $this->execPromise($promises, "alter column $column in table $table to $type");
    }
public function alterColumn ( $ table , $ column , $ type ) { $ promises = [ ] ; $ promises [ ] = $ this -> createCommand ( ) -> alterColumn ( $ table , $ column , $ type ) -> execute ( ) ; if ( $ type instanceof ColumnSchemaBuilder && $ type -> comment !== null ) { $ promises [ ] = $ this -> createCommand ( ) -> addCommentOnColumn ( $ table , $ column , $ type -> comment ) -> execute ( ) ; } return $ this -> execPromise ( $ promises , "alter column $column in table $table to $type" ) ; }
Builds and executes a SQL statement for changing the definition of a column.
@param string $table the table whose column is to be changed. The table name will be properly quoted by the method.
@param string $column the name of the column to be changed. The name will be properly quoted by the method.
@param string $type the new 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'.
@return LazyPromiseInterface
Builds and executes a SQL statement for changing the definition of a column .