public function create($columns, $options='charset=utf8 engine=innodb')
    {
        $columnSql = array();
        $platform = $this->_connection->platform();

        foreach($columns as $name=>$type)
            $columnSql []= $type->columnSql($name, $platform);

        $sql = sprintf('CREATE TABLE %s (%s) %s',
            $this->_name->quoted(),
            implode(', ', $columnSql),
            $options
        );

        $this->_connection->execute($sql);
    }
public function create($columns, $options='charset=utf8 engine=innodb')
    {
        $columnSql = array();
        $platform = $this->_connection->platform();

        foreach($columns as $name=>$type)
            $columnSql []= $type->columnSql($name, $platform);

        $sql = sprintf('CREATE TABLE %s (%s) %s',
            $this->_name->quoted(),
            implode(', ', $columnSql),
            $options
        );

        $this->_connection->execute($sql);
    }
public function create ( $ columns , $ options = 'charset=utf8 engine=innodb' ) { $ columnSql = array ( ) ; $ platform = $ this -> _connection -> platform ( ) ; foreach ( $ columns as $ name => $ type ) $ columnSql [ ] = $ type -> columnSql ( $ name , $ platform ) ; $ sql = sprintf ( 'CREATE TABLE %s (%s) %s' , $ this -> _name -> quoted ( ) , implode ( ', ' , $ columnSql ) , $ options ) ; $ this -> _connection -> execute ( $ sql ) ; }
Creates the table, fails if the table exists
@param $columns a map defining columns to Type objects
Creates the table fails if the table exists