public function getColumnDefinition(ColumnInterface $column)
    {
        $sql = parent::getColumnDefinition($column);
        if ($column instanceof Column && $column->getComment()) {
            $sql .= " COMMENT \"" . addcslashes($column->getComment(), '"') . "\"";
        }
        $def = $column->getDefault();
        // empty value will ignore when create table
        if (isset($def) && in_array($def, [0, '', '0'])) {
            $sql .= ' DEFAULT "' . $def . '"';
        }
        if ($column->getType() == Column::TYPE_INTEGER
            && $column->getSize() == 4) {
            $sql = preg_replace('/^INT/', 'TINYINT', $sql);
        }
        return $sql;
    }
public function getColumnDefinition(ColumnInterface $column)
    {
        $sql = parent::getColumnDefinition($column);
        if ($column instanceof Column && $column->getComment()) {
            $sql .= " COMMENT \"" . addcslashes($column->getComment(), '"') . "\"";
        }
        $def = $column->getDefault();
        // empty value will ignore when create table
        if (isset($def) && in_array($def, [0, '', '0'])) {
            $sql .= ' DEFAULT "' . $def . '"';
        }
        if ($column->getType() == Column::TYPE_INTEGER
            && $column->getSize() == 4) {
            $sql = preg_replace('/^INT/', 'TINYINT', $sql);
        }
        return $sql;
    }
public function getColumnDefinition ( ColumnInterface $ column ) { $ sql = parent :: getColumnDefinition ( $ column ) ; if ( $ column instanceof Column && $ column -> getComment ( ) ) { $ sql .= " COMMENT \"" . addcslashes ( $ column -> getComment ( ) , '"' ) . "\"" ; } $ def = $ column -> getDefault ( ) ; // empty value will ignore when create table if ( isset ( $ def ) && in_array ( $ def , [ 0 , '' , '0' ] ) ) { $ sql .= ' DEFAULT "' . $ def . '"' ; } if ( $ column -> getType ( ) == Column :: TYPE_INTEGER && $ column -> getSize ( ) == 4 ) { $ sql = preg_replace ( '/^INT/' , 'TINYINT' , $ sql ) ; } return $ sql ; }
supports comment and tinyint
supports comment and tinyint