framework/db/Command.php
public function createTable($table, $columns, $options = null)
    {
        $sql = $this->db->getQueryBuilder()->createTable($table, $columns, $options);

        return $this->setSql($sql)->requireTableSchemaRefresh($table);
    }
public function createTable($table, $columns, $options = null)
    {
        $sql = $this->db->getQueryBuilder()->createTable($table, $columns, $options);

        return $this->setSql($sql)->requireTableSchemaRefresh($table);
    }
public function createTable ( $ table , $ columns , $ options = null ) { $ sql = $ this -> db -> getQueryBuilder ( ) -> createTable ( $ table , $ columns , $ options ) ; return $ this -> setSql ( $ sql ) -> requireTableSchemaRefresh ( $ table ) ; }
Creates a SQL command for creating a new DB table.

The columns in the new table should be specified as name-definition pairs (e.g. 'name' => 'string'),
where name stands for a column name which will be properly quoted by the method, and definition
stands for the column type which can contain an abstract DB type.
The method [[QueryBuilder::getColumnType()]] will be called
to convert the abstract column types to physical ones. For example, `string` will be converted
as `varchar(255)`, and `string not null` becomes `varchar(255) not null`.

If a column is specified with definition only (e.g. 'PRIMARY KEY (name, type)'), it will be directly
inserted into the generated SQL.

@param string $table the name of the table to be created. The name will be properly quoted by the method.
@param array $columns the columns (name => definition) in the new table.
@param string $options additional SQL fragment that will be appended to the generated SQL.
@return $this the command object itself
Creates a SQL command for creating a new DB table .