core/Mysql.php
public function createTable(string $tbname, array $options = [])
    {
        $options = array_merge([
            'engine' => 'InnoDB',
            'charset' => 'utf8',
            'comment' => '',
        ], $options);
        if ($this->existsTable($tbname)) {
            throw new MysqlException("数据库表已经存在,{$tbname}");
        }
        $sql = "create table `{$tbname}` (`id` int(11) not null auto_increment,primary key (`id`)) engine={$options['engine']} default charset={$options['charset']} comment=?";
        $stm = $this->execute($sql, [$options['comment']]);
        if (!$stm) {
            throw new MysqlException("创建数据库表失败,{$tbname}");
        }
    }
public function createTable(string $tbname, array $options = [])
    {
        $options = array_merge([
            'engine' => 'InnoDB',
            'charset' => 'utf8',
            'comment' => '',
        ], $options);
        if ($this->existsTable($tbname)) {
            throw new MysqlException("数据库表已经存在,{$tbname}");
        }
        $sql = "create table `{$tbname}` (`id` int(11) not null auto_increment,primary key (`id`)) engine={$options['engine']} default charset={$options['charset']} comment=?";
        $stm = $this->execute($sql, [$options['comment']]);
        if (!$stm) {
            throw new MysqlException("创建数据库表失败,{$tbname}");
        }
    }
创建数据库表
@param string $tbname
@param array $options
@throws MysqlException