public function addForeignKey(string $name, $mapperClass, $onDelete = true, $onUpdate = false): Column
	{
		$table = $this->getTableData($mapperClass);

		$constrait = new Constrait($name, $this, $table, $onDelete, $onUpdate);

		$this->constraints[$constrait->name] = $constrait;
		return $constrait->column;
	}
public function addForeignKey(string $name, $mapperClass, $onDelete = true, $onUpdate = false): Column
	{
		$table = $this->getTableData($mapperClass);

		$constrait = new Constrait($name, $this, $table, $onDelete, $onUpdate);

		$this->constraints[$constrait->name] = $constrait;
		return $constrait->column;
	}
public function addForeignKey ( string $ name , $ mapperClass , $ onDelete = true , $ onUpdate = false ) : Column { $ table = $ this -> getTableData ( $ mapperClass ) ; $ constrait = new Constrait ( $ name , $ this , $ table , $ onDelete , $ onUpdate ) ; $ this -> constraints [ $ constrait -> name ] = $ constrait ; return $ constrait -> column ; }
Nastavi cizi klic
@param string $name
@param string|Table $mapperClass klic uz musi byt v tabulce nastaven
@param mixed $onDelete false => RESTRICT, true => CASCADE, null => SET null
@param mixed $onUpdate false => RESTRICT, true => CASCADE, null => SET null
@return Column
Nastavi cizi klic