src/Db/MySqlDb.php
protected function columnDefString($name, array $def) {
        $result = $this->backtick($name).' '.$this->columnTypeString($def['type']);

        if (val('required', $def)) {
            $result .= ' not null';
        }

        if (isset($def['default'])) {
            $result .= ' default '.$this->quoteVal($def['default']);
        }

        if (val('autoincrement', $def)) {
            $result .= ' auto_increment';
        }

        return $result;
    }
protected function columnDefString($name, array $def) {
        $result = $this->backtick($name).' '.$this->columnTypeString($def['type']);

        if (val('required', $def)) {
            $result .= ' not null';
        }

        if (isset($def['default'])) {
            $result .= ' default '.$this->quoteVal($def['default']);
        }

        if (val('autoincrement', $def)) {
            $result .= ' auto_increment';
        }

        return $result;
    }
Construct a column definition string from an array defintion.

@param string $name The name of the column.
@param array $def The column definition.
@return string Returns a string representing the column definition.