src/PDO/SchemaPDOSqlite.php
/**
     * Collects the foreign key column details for the given table.
     *
     * @param TableSchema $table the table metadata.
     *
     * @throws Exception|InvalidConfigException|Throwable
     */
Collects the foreign key column details for the given table.
@param TableSchema $table the table metadata.


Collects the foreign key column details for the given table . @param TableSchema $table the table metadata .
protected function findConstraints(TableSchema $table): void
    {
        $foreignKeysList = $this->getPragmaForeignKeyList($table->getName());
        foreach ($foreignKeysList as $foreignKey) {
            $id = (int) $foreignKey['id'];
            $fk = $table->getForeignKeys();
            if (!isset($fk[$id])) {
                $table->foreignKey($id, ([$foreignKey['table'], $foreignKey['from'] => $foreignKey['to']]));
            } else {
                $table->compositeFK($id, $foreignKey['from'], $foreignKey['to']);
            }
        }
    }
protected function findConstraints ( TableSchema $ table ) : void { $ foreignKeysList = $ this -> getPragmaForeignKeyList ( $ table -> getName ( ) ) ; foreach ( $ foreignKeysList as $ foreignKey ) { $ id = ( int ) $ foreignKey [ 'id' ] ; $ fk = $ table -> getForeignKeys ( ) ; if ( ! isset ( $ fk [ $ id ] ) ) { $ table -> foreignKey ( $ id , ( [ $ foreignKey [ 'table' ] , $ foreignKey [ 'from' ] => $ foreignKey [ 'to' ] ] ) ) ; } else { $ table -> compositeFK ( $ id , $ foreignKey [ 'from' ] , $ foreignKey [ 'to' ] ) ; } } }
Collects the foreign key column details for the given table.
Collects the foreign key column details for the given table .
/** @psalm-var PragmaForeignKeyList */ /** composite FK */