yii\db\mysql\Schema::getCreateTableSql PHP Method

getCreateTableSql() protected method

Gets the CREATE TABLE sql string.
protected getCreateTableSql ( yii\db\TableSchema $table ) : string
$table yii\db\TableSchema the table metadata
return string $sql the result of 'SHOW CREATE TABLE'
    protected function getCreateTableSql($table)
    {
        $row = $this->db->createCommand('SHOW CREATE TABLE ' . $this->quoteTableName($table->fullName))->queryOne();
        if (isset($row['Create Table'])) {
            $sql = $row['Create Table'];
        } else {
            $row = array_values($row);
            $sql = $row[1];
        }
        return $sql;
    }