src/Database/Migration/Adapter/SQLiteAdapter.php
protected function getColumnSqlDefinition(Column $column)
    {
        $sqlType = $this->getSqlType($column->getType());
        $def = '';
        $def .= strtoupper($sqlType['name']);
        if ($column->getPrecision() && $column->getScale()) {
            $def .= '(' . $column->getPrecision() . ',' . $column->getScale() . ')';
        }
        $limitable = in_array(strtoupper($sqlType['name']), $this->definitionsWithLimits);
        if (($column->getLimit() || isset($sqlType['limit'])) && $limitable) {
            $def .= '(' . ($column->getLimit() ?: $sqlType['limit']) . ')';
        }
        if (($values = $column->getValues()) && is_array($values)) {
            $def .= " CHECK({$column->getName()} IN ('" . implode("', '", $values) . "'))";
        }

        $default = $column->getDefault();

        $def .= ($column->isNull() || is_null($default)) ? ' NULL' : ' NOT NULL';
        $def .= $this->getDefaultValueDefinition($default);
        $def .= ($column->isIdentity()) ? ' PRIMARY KEY AUTOINCREMENT' : '';

        if ($column->getUpdate()) {
            $def .= ' ON UPDATE ' . $column->getUpdate();
        }

        $def .= $this->getCommentDefinition($column);

        return $def;
    }
protected function getColumnSqlDefinition(Column $column)
    {
        $sqlType = $this->getSqlType($column->getType());
        $def = '';
        $def .= strtoupper($sqlType['name']);
        if ($column->getPrecision() && $column->getScale()) {
            $def .= '(' . $column->getPrecision() . ',' . $column->getScale() . ')';
        }
        $limitable = in_array(strtoupper($sqlType['name']), $this->definitionsWithLimits);
        if (($column->getLimit() || isset($sqlType['limit'])) && $limitable) {
            $def .= '(' . ($column->getLimit() ?: $sqlType['limit']) . ')';
        }
        if (($values = $column->getValues()) && is_array($values)) {
            $def .= " CHECK({$column->getName()} IN ('" . implode("', '", $values) . "'))";
        }

        $default = $column->getDefault();

        $def .= ($column->isNull() || is_null($default)) ? ' NULL' : ' NOT NULL';
        $def .= $this->getDefaultValueDefinition($default);
        $def .= ($column->isIdentity()) ? ' PRIMARY KEY AUTOINCREMENT' : '';

        if ($column->getUpdate()) {
            $def .= ' ON UPDATE ' . $column->getUpdate();
        }

        $def .= $this->getCommentDefinition($column);

        return $def;
    }
protected function getColumnSqlDefinition ( Column $ column ) { $ sqlType = $ this -> getSqlType ( $ column -> getType ( ) ) ; $ def = '' ; $ def .= strtoupper ( $ sqlType [ 'name' ] ) ; if ( $ column -> getPrecision ( ) && $ column -> getScale ( ) ) { $ def .= '(' . $ column -> getPrecision ( ) . ',' . $ column -> getScale ( ) . ')' ; } $ limitable = in_array ( strtoupper ( $ sqlType [ 'name' ] ) , $ this -> definitionsWithLimits ) ; if ( ( $ column -> getLimit ( ) || isset ( $ sqlType [ 'limit' ] ) ) && $ limitable ) { $ def .= '(' . ( $ column -> getLimit ( ) ? : $ sqlType [ 'limit' ] ) . ')' ; } if ( ( $ values = $ column -> getValues ( ) ) && is_array ( $ values ) ) { $ def .= " CHECK({$column->getName()} IN ('" . implode ( "', '" , $ values ) . "'))" ; } $ default = $ column -> getDefault ( ) ; $ def .= ( $ column -> isNull ( ) || is_null ( $ default ) ) ? ' NULL' : ' NOT NULL' ; $ def .= $ this -> getDefaultValueDefinition ( $ default ) ; $ def .= ( $ column -> isIdentity ( ) ) ? ' PRIMARY KEY AUTOINCREMENT' : '' ; if ( $ column -> getUpdate ( ) ) { $ def .= ' ON UPDATE ' . $ column -> getUpdate ( ) ; } $ def .= $ this -> getCommentDefinition ( $ column ) ; return $ def ; }
Gets the SQLite Column Definition for a Column object.

@param Column $column Column

@return string
Gets the SQLite Column Definition for a Column object .