src/Flipbox/OrmManager/DatabaseConnection.php
protected function isForeignKey(Table $table, Column $column)
	{
		$foreignKey = false;

		foreach ($table->getIndexes() as $key => $index) {
			if ($key !== 'primary') {
				try {
					$fkConstrain = $table->getForeignkey($key);
					$foreignKey = in_array($column->getName(), $fkConstrain->getColumns());
				} catch (Exception $e) {
					//do noting
				}
			}
		}

		return $foreignKey;
	}
protected function isForeignKey(Table $table, Column $column)
	{
		$foreignKey = false;

		foreach ($table->getIndexes() as $key => $index) {
			if ($key !== 'primary') {
				try {
					$fkConstrain = $table->getForeignkey($key);
					$foreignKey = in_array($column->getName(), $fkConstrain->getColumns());
				} catch (Exception $e) {
					//do noting
				}
			}
		}

		return $foreignKey;
	}
protected function isForeignKey ( Table $ table , Column $ column ) { $ foreignKey = false ; foreach ( $ table -> getIndexes ( ) as $ key => $ index ) { if ( $ key !== 'primary' ) { try { $ fkConstrain = $ table -> getForeignkey ( $ key ) ; $ foreignKey = in_array ( $ column -> getName ( ) , $ fkConstrain -> getColumns ( ) ) ; } catch ( Exception $ e ) { //do noting } } } return $ foreignKey ; }
check is column foreign key

@param Table $table
@param Column $column
@return bool
check is column foreign key