src/Driver/SQLiteDriver.php
protected function reference($table, Column $column)
    {
        $query = 'PRAGMA foreign_key_list("' . $table . '");';

        $result = $this->pdo->prepare($query);

        $result->execute();

        $result->setFetchMode(\PDO::FETCH_OBJ);

        while ($row = $result->fetch()) {
            if ($column->getField() === $row->from) {
                $column->setReferencedTable($row->table);

                $column->setForeign(true);

                $column->setReferencedField($row->to);
            }
        }

        return $column;
    }
protected function reference($table, Column $column)
    {
        $query = 'PRAGMA foreign_key_list("' . $table . '");';

        $result = $this->pdo->prepare($query);

        $result->execute();

        $result->setFetchMode(\PDO::FETCH_OBJ);

        while ($row = $result->fetch()) {
            if ($column->getField() === $row->from) {
                $column->setReferencedTable($row->table);

                $column->setForeign(true);

                $column->setReferencedField($row->to);
            }
        }

        return $column;
    }
Sets the properties of a column if it does exists.

@param  string                  $table
@param  \Rougin\Describe\Column $column
@return \Rougin\Describe\Column