src/PDO/SchemaPDOSqlite.php
/**
     * Collects the table column metadata.
     *
     * @param TableSchema $table the table metadata.
     *
     * @throws Exception|InvalidConfigException|Throwable
     *
     * @return bool whether the table exists in the database.
     */
Collects the table column metadata.
@param TableSchema $table the table metadata.



@return bool whether the table exists in the database.
Collects the table column metadata . @param TableSchema $table the table metadata . @return bool whether the table exists in the database .
protected function findColumns(TableSchema $table): bool
    {
        $columns = $this->getPragmaTableInfo($table->getName());
        foreach ($columns as $info) {
            $column = $this->loadColumnSchema($info);
            $table->columns($column->getName(), $column);
            if ($column->isPrimaryKey()) {
                $table->primaryKey($column->getName());
            }
        }
        $column = count($table->getPrimaryKey()) === 1 ? $table->getColumn((string) $table->getPrimaryKey()[0]) : null;
        if ($column !== null && !strncasecmp($column->getDbType(), 'int', 3)) {
            $table->sequenceName('');
            $column->autoIncrement(true);
        }
        return !empty($columns);
    }
protected function findColumns ( TableSchema $ table ) : bool { $ columns = $ this -> getPragmaTableInfo ( $ table -> getName ( ) ) ; foreach ( $ columns as $ info ) { $ column = $ this -> loadColumnSchema ( $ info ) ; $ table -> columns ( $ column -> getName ( ) , $ column ) ; if ( $ column -> isPrimaryKey ( ) ) { $ table -> primaryKey ( $ column -> getName ( ) ) ; } } $ column = count ( $ table -> getPrimaryKey ( ) ) === 1 ? $ table -> getColumn ( ( string ) $ table -> getPrimaryKey ( ) [ 0 ] ) : null ; if ( $ column !== null && ! strncasecmp ( $ column -> getDbType ( ) , 'int' , 3 ) ) { $ table -> sequenceName ( '' ) ; $ column -> autoIncrement ( true ) ; } return ! empty ( $ columns ) ; }
Collects the table column metadata.
Collects the table column metadata .
/** @psalm-var PragmaTableInfo */