Pheasant\Database\Mysqli\Table::create PHP Method

create() public method

Creates the table, fails if the table exists
public create ( $columns, $options = 'charset=utf8 engine=innodb' )
$columns a map defining columns to Type objects
    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);
    }